Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Created April 17, 2024 12:01
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 Wolfr/a42bc1094d6d20575a559a3d89e79e1e to your computer and use it in GitHub Desktop.
Save Wolfr/a42bc1094d6d20575a559a3d89e79e1e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
@mixin dark-mode {
:global(html[data-theme='system']) {
@media (prefers-color-scheme: dark) {
@content;
}
}
:global(html[data-theme='dark']) {
@content;
}
}
$blue-300: #437ae0;
$blue-500: #1f51af;
.CurrentMethod {
background-color: $blue-500;
}
@include dark-mode {
.CurrentMethod {
background-color: $blue-300;
}
}
.CurrentMethod {
background-color: #1f51af;
}
@media (prefers-color-scheme: dark) {
:global(html[data-theme="system"]) .CurrentMethod {
background-color: #437ae0;
}
}
:global(html[data-theme="dark"]) .CurrentMethod {
background-color: #437ae0;
}
{
"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