Created
July 1, 2022 15:17
-
-
Save norin89/86ce49aa69dae482541192a88f681a04 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Root should be passed for modifiers only */ | |
@mixin hoverable($root: '') { | |
@at-root { | |
a#{&}, | |
button#{&}, | |
label#{&}, | |
&#{$root}--hoverable { | |
@content; | |
} | |
} | |
} | |
.box { | |
$root: &; | |
content: "block"; | |
@include hoverable { | |
content: "block - hoverable"; | |
} | |
&--element { | |
content: "element"; | |
@include hoverable($root) { | |
content: "element hoverable"; | |
} | |
} | |
&--modifier { | |
content: "modifier"; | |
@include hoverable($root) { | |
content: "modifier hoverable"; | |
} | |
} | |
&.-is-state { | |
content: "state"; | |
@include hoverable { | |
content: "state hoverable"; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Root should be passed for modifiers only */ | |
.box { | |
content: "block"; | |
} | |
a.box, | |
button.box, | |
label.box, .box--hoverable { | |
content: "block - hoverable"; | |
} | |
.box--element { | |
content: "element"; | |
} | |
a.box--element, | |
button.box--element, | |
label.box--element, .box--element.box--hoverable { | |
content: "element hoverable"; | |
} | |
.box--modifier { | |
content: "modifier"; | |
} | |
a.box--modifier, | |
button.box--modifier, | |
label.box--modifier, .box--modifier.box--hoverable { | |
content: "modifier hoverable"; | |
} | |
.box.-is-state { | |
content: "state"; | |
} | |
a.box.-is-state, | |
button.box.-is-state, | |
label.box.-is-state, .box.-is-state--hoverable { | |
content: "state hoverable"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment