|
4 | 4 | * By Hakim El Hattab, http://hakim.se |
5 | 5 | */ |
6 | 6 |
|
| 7 | +// Load utils |
| 8 | +@use 'sass:color'; |
| 9 | +@use 'template/mixins' as mixins; |
7 | 10 |
|
8 | | -// Default mixins and settings ----------------- |
9 | | -@import "../template/mixins"; |
10 | | -@import "../template/settings"; |
11 | | -// --------------------------------------------- |
| 11 | +$active-color: #2a76dd; |
| 12 | + |
| 13 | +// Inject theme variables (with some overrides) |
| 14 | +@use 'template/settings' with ( |
| 15 | + $background-color: #fff, |
| 16 | + |
| 17 | + $block-margin: 10px, |
| 18 | + |
| 19 | + $main-color: #222, |
| 20 | + $main-font-size: 40px, |
| 21 | + $main-font: "'Roboto', sans-serif", |
| 22 | + |
| 23 | + $heading-color: #222, |
| 24 | + $heading-margin: 0 0 10px 0, |
| 25 | + $heading-font: "'Saira Condensed', Impact, sans-serif", |
| 26 | + $heading-text-shadow: none, |
| 27 | + $heading-letter-spacing: -0.03em, |
| 28 | + $heading-line-height: 1, |
| 29 | + $heading-text-transform: uppercase, |
| 30 | + $heading-font-weight: 900, |
| 31 | + |
| 32 | + $heading1-size: 2.3em, |
| 33 | + $heading2-size: 1.7em, |
| 34 | + $heading3-size: 1.3em, |
| 35 | + $heading4-size: 1.0em, |
| 36 | + |
| 37 | + $code-font: "'Fira Code', monospace", |
| 38 | + |
| 39 | + $link-color: $active-color, |
| 40 | + $link-color-hover: color.scale($active-color, $lightness: 15%), |
| 41 | + $selection-background-color: color.scale($active-color, $lightness: 25%) |
| 42 | +); |
| 43 | + |
| 44 | +// Inject the theme template |
| 45 | +@use 'template/theme'; |
12 | 46 |
|
13 | 47 | // Include theme-specific fonts |
14 | 48 | @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&family=Roboto&family=Saira+Condensed:wght@900&display=swap'); |
15 | 49 |
|
16 | | -// Override theme settings (see ../template/settings.scss) |
17 | | -$backgroundColor: #fff; |
18 | | - |
19 | | -$blockMargin: 10px; |
20 | | - |
21 | | -$mainColor: #222; |
22 | | -$headingColor: #222; |
23 | | - |
24 | | -$mainFontSize: 40px; |
25 | | -$mainFont: 'Roboto', sans-serif; |
26 | | -$headingMargin: 0 0 $blockMargin 0; |
27 | | -$headingFont: 'Saira Condensed', Impact, sans-serif; |
28 | | -$headingTextShadow: none; |
29 | | -$headingLetterSpacing: -0.03em; |
30 | | -$headingLineHeight: 1; |
31 | | -$headingTextTransform: uppercase; |
32 | | -$headingFontWeight: 900; |
33 | | -$codeFont: 'Fira Code', monospace; |
34 | | -$linkColor: #2a76dd; |
35 | | -$linkColorHover: lighten( $linkColor, 15% ); |
36 | | -$selectionBackgroundColor: lighten( $linkColor, 25% ); |
37 | | - |
38 | | -$heading1Size: 2.3em; |
39 | | -$heading2Size: 1.7em; |
40 | | -$heading3Size: 1.3em; |
41 | | -$heading4Size: 1.0em; |
42 | | - |
43 | | -section.has-dark-background { |
44 | | - &, h1, h2, h3, h4, h5, h6 { |
45 | | - color: #fff; |
46 | | - } |
47 | | -} |
| 50 | +// Change text when the background is inverted |
| 51 | +@include mixins.dark-bg-text-color(#fff); |
48 | 52 |
|
49 | 53 | .slide-background { |
50 | 54 | filter: grayscale(50%) opacity(20%) blur(0); |
@@ -111,7 +115,3 @@ body:after { |
111 | 115 | bottom: -14em; |
112 | 116 | left: -26em; |
113 | 117 | } |
114 | | - |
115 | | -// Theme template ------------------------------ |
116 | | -@import "../template/theme"; |
117 | | -// --------------------------------------------- |
0 commit comments