Created
July 11, 2023 13:42
-
-
Save feoche/00054db8f9df3c1ec24216460ba4c6bd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
@mixin wrapComponent($selector) { | |
:host, | |
.#{$selector} { | |
@content; | |
} | |
} | |
@mixin wrapSlot($slotName) { | |
slot[name="#{$slotName}"] { | |
@content; | |
} | |
} | |
@mixin wrapSlotted($slotName) { | |
::slotted([slot="#{$slotName}"]) { | |
@content; | |
} | |
} | |
@include wrapComponent(otds-button) { | |
background: red; | |
@include wrapSlot("") { | |
background: blue; | |
} | |
@include wrapSlot(title) { | |
background: green; | |
} | |
@include wrapSlotted("") { | |
background: cyan; | |
} | |
@include wrapSlotted(title) { | |
background: magenta; | |
} | |
} |
This file contains 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
:host, | |
.otds-button { | |
background: red; | |
} | |
:host slot[name=""], | |
.otds-button slot[name=""] { | |
background: blue; | |
} | |
:host slot[name=title], | |
.otds-button slot[name=title] { | |
background: green; | |
} | |
:host ::slotted([slot=""]), | |
.otds-button ::slotted([slot=""]) { | |
background: cyan; | |
} | |
:host ::slotted([slot=title]), | |
.otds-button ::slotted([slot=title]) { | |
background: magenta; | |
} |
This file contains 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