Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f3e545

Browse files
Update consolidated snippets
1 parent 455d38f commit 6f3e545

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎public/consolidated/scss.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,21 @@
9595
"contributors": [],
9696
"code": "@mixin aspect-ratio($width, $height) {\n position: relative;\n width: 100%;\n padding-top: ($height / $width) * 100%;\n > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n}\n"
9797
},
98+
{
99+
"title": "Dark Theme",
100+
"description": "SCSS mixin to change styles for dark themes.",
101+
"author": "gihanrangana",
102+
"tags": [
103+
"scss",
104+
"css",
105+
"mixin",
106+
"snippet",
107+
"dark-theme",
108+
"layout"
109+
],
110+
"contributors": [],
111+
"code": "@mixin isDark($type: 'module') {\n $root: &;\n\n @if $type == 'module' {\n :global {\n @at-root body[theme='dark'] #{$root} {\n @content;\n }\n }\n } @else {\n &[theme='dark'] {\n @content;\n }\n }\n}\n\n// Usage:\n.container{\n\tbackground: #f0f0f0;\n\t@include isDark {\n\t\tbackground: #222;\n\t}\n}\n"
112+
},
98113
{
99114
"title": "Flex Center",
100115
"description": "A mixin to center content using flexbox.",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /