Skip to content

Commit d81ab30

Browse files
authored
scss mixin for dark theme management
1 parent 21c1695 commit d81ab30

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

public/data/scss.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@
109109
],
110110
"tags": ["scss", "aspect-ratio", "layout", "css"],
111111
"author": "dostonnabotov"
112+
},
113+
{
114+
"title": "Dark Theme",
115+
"description": "Change styles for dark theme.",
116+
"code": [
117+
"@mixin isDark($type: 'module') {",
118+
" $root: &;",
119+
"",
120+
" @if $type == 'module' {",
121+
" :global {",
122+
" @at-root body[theme='dark'] #{$root} {",
123+
" @content;",
124+
" }",
125+
" }",
126+
" } @else {",
127+
" &[theme='dark'] {",
128+
" @content;",
129+
" }",
130+
" }",
131+
"}"
132+
],
133+
"tags": ["scss", "mixin", "layout", "css","dark-mode"],
134+
"author": "gihanrangana"
112135
}
113136
]
114137
},

0 commit comments

Comments
 (0)