variables.scss (1122B)
1 @mixin themify($themes: $themes) { 2 @each $theme, $map in $themes { 3 4 .theme-#{$theme} & { 5 $theme-map: () !global; 6 @each $key, $submap in $map { 7 $value: map-get(map-get($themes, $theme), '#{$key}'); 8 $theme-map: map-merge($theme-map, ($key: $value)) !global; 9 } 10 11 @content; 12 $theme-map: null !global; 13 } 14 15 } 16 } 17 18 @function themed($key) { 19 @return map-get($theme-map, $key); 20 } 21 22 $themes: ( 23 light: ( 24 color-text: #242424, 25 color-background: #E3E0D7, 26 color-background-hover: #D4D1C7, 27 color-border: #555555, 28 color-red: #C31B00, 29 color-blue: #2263b6, 30 color-green: #257933, 31 font-weight: 400, 32 font-weight-bold: 600, 33 ), 34 dark: ( 35 color-text: #E3E0D7, 36 color-background: #242424, 37 color-background-hover: #303030, 38 color-border: #808080, 39 color-red: #F9690E, 40 color-blue: #8DBFFF, 41 color-green: #79D688, 42 font-weight: 300, 43 font-weight-bold: 700, 44 ), 45 ); 46 47 $font-mono: 'iA Writer Duospace', monospace; 48 $font-text: -apple-system, BlinkMacSystemFont, avenir, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;