Skip to content

Instantly share code, notes, and snippets.

@jelbourn
Created December 15, 2022 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelbourn/ee1d64d02ea8558bad3764461d6d3d0b to your computer and use it in GitHub Desktop.
Save jelbourn/ee1d64d02ea8558bad3764461d6d3d0b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
@function button() {
@return (
id: 'mat-button',
something: 'xxx',
)
}
@mixin button-theme($theme) {
.mat-button {
color: blue;
}
}
@mixin theme($theme, $components) {
@each $component in $components {
@if (map-get($component, 'id') == 'mat-button') {
@include button-theme($theme);
}
}
}
app {
background: black;
}
@include theme((), (
button(),
))
app {
background: black;
}
.mat-button {
color: blue;
}
{
"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