Skip to content

Commit 455d38f

Browse files
authored
fix CRLF
1 parent a815b78 commit 455d38f

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

snippets/scss/layouts/dark-theme.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
---
2-
title: Dark Theme
3-
description: SCSS mixin to change styles for dark themes.
4-
author: gihanrangana
5-
tags: scss, css, mixin, snippet, dark-theme, layout
6-
---
7-
8-
```scss
9-
@mixin isDark($type: 'module') {
10-
$root: &;
11-
12-
@if $type == 'module' {
13-
:global {
14-
@at-root body[theme='dark'] #{$root} {
15-
@content;
16-
}
17-
}
18-
} @else {
19-
&[theme='dark'] {
20-
@content;
21-
}
22-
}
23-
}
24-
25-
// Usage:
26-
.container{
27-
background: #f0f0f0;
28-
@include isDark {
29-
background: #222;
30-
}
31-
}
1+
---
2+
title: Dark Theme
3+
description: SCSS mixin to change styles for dark themes.
4+
author: gihanrangana
5+
tags: scss, css, mixin, snippet, dark-theme, layout
6+
---
7+
8+
```scss
9+
@mixin isDark($type: 'module') {
10+
$root: &;
11+
12+
@if $type == 'module' {
13+
:global {
14+
@at-root body[theme='dark'] #{$root} {
15+
@content;
16+
}
17+
}
18+
} @else {
19+
&[theme='dark'] {
20+
@content;
21+
}
22+
}
23+
}
24+
25+
// Usage:
26+
.container{
27+
background: #f0f0f0;
28+
@include isDark {
29+
background: #222;
30+
}
31+
}
3232
```

0 commit comments

Comments
 (0)