1
- # postcss-attribute-selector-prefix plugin for postcss
2
- > Adds a namespace/prefix to attribute selector, needs to escape from the third-party frameworks .
1
+ # postcss-attribute-selector-prefix < a href = " https://github.com/postcss/postcss " >< img align = " left " height = " 49 " title = " PostCSS " src = " http:// postcss.github.io/postcss/logo.svg " ></ a >
2
+ > [ PostCSS ] ( https://github.com/postcss/postcss ) plugin adds a namespace/prefix to attribute selector.
3
3
4
+ [](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[][testen repo][]()[](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[](https://github.com/sindresorhus/xo)[](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)
4
5
5
- [](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[](https://github.com/sindresorhus/xo)[](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)[](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[](https://www.npmjs.com/package/postcss-attribute-selector-prefix)
6
+ [ ![ npm downloads] ( https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square )] ( https://www.npmjs.com/package/postcss-attribute-selector-prefix ) [ ![ npm] ( https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square )] ( https://www.npmjs.com/package/postcss-attribute-selector-prefix )
6
7
7
- ``` css
8
- /* input.css */
9
- .class ,
10
- [type = " text" ],
11
- [class *= " lorem" ] {
12
- color :red ;
13
- }
14
- ```
15
-
16
- ``` css
17
- /* Output example */
18
- .class ,
19
- [type = " text" ],
20
- [class *= " test-lorem" ] {
21
- color :red ;
22
- }
23
- ```
8
+ ## Why ?
9
+ Needs to escape from the third-party frameworks.
24
10
25
- ## Installation
11
+ ## Install
26
12
27
- ``` console
28
- $ npm install postcss-attribute-selector-prefix
13
+ ``` bash
14
+ $ npm install postcss-at-rules-variables
29
15
```
30
16
17
+ > ** Note:** This project is compatible with node v4+
18
+
31
19
## Usage
32
20
33
21
``` js
@@ -48,20 +36,40 @@ var output = postcss()
48
36
console .log (output);
49
37
```
50
38
51
- ### Options
39
+ ## Example
40
+
41
+ ``` css
42
+ /* input.css */
43
+ .class ,
44
+ [type = " text" ],
45
+ [class *= " lorem" ] {
46
+ color :red ;
47
+ }
48
+ ```
49
+
50
+ ``` css
51
+ /* Output example */
52
+ .class ,
53
+ [type = " text" ],
54
+ [class *= " test-lorem" ] {
55
+ color :red ;
56
+ }
57
+ ```
58
+
59
+ ## Options
52
60
53
61
#### ` prefix `
54
- * add prefix to attribute selector*
55
62
56
63
Type: ` string `
57
- Default: ``
64
+ Default: ``
65
+ Description: * add prefix to attribute selector*
58
66
59
67
#### ` filter `
60
- * attribute selector to which we must add the prefix*
61
68
62
69
Type: ` Array `
63
70
Default: ` [] `
64
- Example: ` ['class', 'id'] `
71
+ Description: * attribute selector to which we must add the prefix*
72
+ Example: ` ['class', 'id'] `
65
73
66
74
``` css
67
75
/* input.css */
@@ -84,10 +92,11 @@ Example: `['class', 'id']`
84
92
```
85
93
86
94
#### ` ignore `
87
- * ignored attribute selector *
95
+
88
96
89
97
Type: ` Array `
90
98
Default: ` [] `
99
+ Description: * ignored attribute selector*
91
100
Example: ` ['type', 'alt'] `
92
101
93
102
``` css
@@ -110,4 +119,21 @@ Example: `['type', 'alt']`
110
119
}
111
120
```
112
121
113
- See [ PostCSS] ( https://github.com/postcss/postcss ) docs for examples for your environment.
122
+ ## LICENSE
123
+
124
+ > MIT License (MIT)
125
+
126
+ > Copyright (c) Ivan Demidov < scrum@list.ru >
127
+
128
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
129
+ of this software and associated documentation files (the "Software"), to deal
130
+ in the Software without restriction, including without limitation the rights
131
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
132
+ copies of the Software, and to permit persons to whom the Software is
133
+ furnished to do so, subject to the following conditions:
134
+
135
+ > The above copyright notice and this permission notice shall be included in all
136
+ copies or substantial portions of the Software.
137
+
138
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
139
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0 commit comments