File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ module.exports = {
1717 } ,
1818 expect : 'basic.expect.css'
1919 } ,
20+ 'basic.button' : {
21+ message : 'supports @extend usage with same tag name and class name' ,
22+ expect : 'basic.button.expect.css'
23+ } ,
2024 'advanced' : {
2125 message : 'supports mixed usage (with postcss-nesting)' ,
2226 plugin : ( ) => require ( 'postcss' ) (
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ function getSelectorIdMatch(selectorIds) {
138138 ) . join ( '|' ) ;
139139
140140 // selector unattached to an existing selector
141- const selectorIdMatch = new RegExp ( `(^|[^\\w-])(${ escapedSelectorIds } )([^\\w-]|$)` , '' ) ;
141+ const selectorIdMatch = new RegExp ( `(^|[^\\w-]!\.!\# )(${ escapedSelectorIds } )([^\\w-]|$)` , '' ) ;
142142
143143 return selectorIdMatch ;
144144}
Original file line number Diff line number Diff line change 1+ button {
2+ color : red;
3+ }
4+
5+ .button {
6+ @extend button;
7+ background : blue;
8+ }
9+
10+ # button {
11+ @extend button;
12+ background : lime;
13+ }
Original file line number Diff line number Diff line change 1+ button {
2+ color : red;
3+ }
4+
5+ .button {
6+ color : red;
7+ background : blue;
8+ }
9+
10+ # button {
11+ color : red;
12+ background : lime;
13+ }
You can’t perform that action at this time.
0 commit comments