Skip to content

Instantly share code, notes, and snippets.

@SallyMcGrath
Last active April 2, 2021 09:34
Show Gist options
  • Save SallyMcGrath/ebf720dc1e9763a40c36a41dc4f82ba6 to your computer and use it in GitHub Desktop.
Save SallyMcGrath/ebf720dc1e9763a40c36a41dc4f82ba6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.card.red {
background: red;
}
.card.red.mix--blue {
background: #0d00f2;
}
.card.blue {
background: blue;
}
.card.blue.mix--red {
background: #f2000d;
}
.card.purple {
background: 150vw;
}
$red: red;
$blue: blue;
$green: green;
$mixQuotient: 5%;
$purple: mix($red, $blue);
$mixedValues: (100vw + 50px);
// coloured cards with colour mix modifiers
.card {
&.red {
background: $red;
&.mix--blue {
background: mix( $red, $blue, $mixQuotient);
}
}
&.blue {
background: $blue;
&.mix--red {
background: mix($blue, $red, $mixQuotient);
}
}
&.purple {
background: $mixedValues
}
}
{
"sass": {
"compiler": "dart-sass/1.26.11",
"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