File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 65
65
}
66
66
```
67
67
68
+ ### Adding multiple namespaces is also supported.
69
+
70
+ ``` javascript
71
+ var postcss = require (' postcss' )
72
+ var selectorNamespace = require (' postcss-selector-namespace' )
73
+
74
+ var output = postcss ()
75
+ .use (selectorNamespace ({ selfSelector: ' :--component' , namespace: ' .foo, .bar' }))
76
+ .process (require (' fs' ).readFileSync (' input.css' , ' utf8' ))
77
+ .css
78
+ ```
79
+
80
+ ` input.css `
81
+ ``` css
82
+ :--component {
83
+ color : black ;
84
+ }
85
+
86
+ :--component.danger {
87
+ color : red ;
88
+ }
89
+
90
+ h1 , .h1 {
91
+ font-weight : bold ;
92
+ }
93
+ ```
94
+
95
+ will output the following css:
96
+
97
+ ``` css
98
+ .foo , .bar {
99
+ color : black ;
100
+ }
101
+
102
+ .foo.danger , .bar.danger {
103
+ color : red ;
104
+ }
105
+
106
+ .foo h1 , .bar .h1 {
107
+ font-weight : bold ;
108
+ }
109
+ ```
110
+
68
111
## SCSS support
69
112
70
113
This plugin can also process scss files and output scss again using the
You can’t perform that action at this time.
0 commit comments