|
| 1 | +@mixin define-theme($name, $selectors: "") { |
| 2 | + $selector: "#{$selectors} [data-theme="#{$name}"], .theme-#{$name}"; |
| 3 | + |
| 4 | + #{$selector} { |
| 5 | + @content; |
| 6 | + } |
| 7 | +} |
| 8 | + |
| 9 | +@include define-theme("dark", ":root,") { |
| 10 | + --clr-white: 255, 255, 255; |
| 11 | + --clr-black: 0, 0, 0; |
| 12 | + |
| 13 | + --clr-border: 255, 255, 255; |
| 14 | + |
| 15 | + --clr-fg-primary: 213, 219, 255; |
| 16 | + --clr-fg-primary-hover: 218, 224, 255; |
| 17 | + --clr-fg-primary-pressed: 225, 229, 255; |
| 18 | + --clr-fg-primary-disabled: 225, 229, 255, 0.5; |
| 19 | + |
| 20 | + --clr-fg-secondary: 120, 129, 141; |
| 21 | + --clr-fg-secondary-hover: 95, 104, 116; |
| 22 | + --clr-fg-secondary-pressed: 130, 141, 155; |
| 23 | + --clr-fg-secondary-disabled: 120, 129, 141, 0.5; |
| 24 | + |
| 25 | + --clr-brand: 43, 75, 255; |
| 26 | + --clr-brand-hover: 40, 67, 221; |
| 27 | + --clr-brand-pressed: 57, 87, 255; |
| 28 | + --clr-brand-disabled: 57, 87, 255, 0.5; |
| 29 | + |
| 30 | + --clr-onbrand: 213, 219, 255; |
| 31 | + --clr-onbrand-hover: 218, 224, 255; |
| 32 | + --clr-onbrand-pressed: 225, 229, 255; |
| 33 | + --clr-onbrand-disabled: 225, 229, 255, 0.5; |
| 34 | + |
| 35 | + --clr-danger: 255, 68, 68; |
| 36 | + --clr-danger-hover: 214, 52, 52; |
| 37 | + --clr-danger-pressed: 255, 86, 86; |
| 38 | + --clr-danger-disabled: 255, 68, 68, 0.5; |
| 39 | + |
| 40 | + --clr-success: 35, 154, 96; |
| 41 | + --clr-success-hover: 26, 135, 82; |
| 42 | + --clr-success-pressed: 44, 172, 110; |
| 43 | + --clr-success-disabled: 35, 154, 96, 0.5; |
| 44 | + |
| 45 | + --clr-component-bg: 26, 34, 41; |
| 46 | + --clr-component-bg-hover: 23, 31, 37; |
| 47 | + --clr-component-bg-pressed: 34, 44, 53; |
| 48 | + --clr-component-bg-disabled: 26, 34, 41, 0.5; |
| 49 | + |
| 50 | + --clr-code-info: 97, 175, 239; |
| 51 | + --clr-code-warn: 229, 192, 123; |
| 52 | + --clr-code-error: 190, 80, 70; |
| 53 | + --clr-code-debug: 43, 75, 255; |
| 54 | + --clr-code-trace: 253, 253, 253; |
| 55 | + |
| 56 | + --clr-link: 97, 175, 239; |
| 57 | + --clr-link-hover: 95, 135, 255; |
| 58 | + --clr-link-pressed: 114, 175, 255; |
| 59 | + --clr-link-disabled: 97, 175, 239, 0.5; |
| 60 | + |
| 61 | + --clr-page: 17, 23, 28; |
| 62 | + --clr-page-elevated: 21, 28, 34; |
| 63 | + --clr-page-pressed: 14, 19, 23; |
| 64 | + |
| 65 | + --clr-secondary: 25, 32, 38; |
| 66 | +} |
| 67 | + |
| 68 | +@include define-theme("light") { |
| 69 | + --clr-white: 255, 255, 255; |
| 70 | + --clr-black: 0, 0, 0; |
| 71 | + |
| 72 | + --clr-border: 40, 40, 40; |
| 73 | + |
| 74 | + --clr-fg-primary: 40, 40, 40; |
| 75 | + --clr-fg-primary-hover: 30, 30, 30; |
| 76 | + --clr-fg-primary-pressed: 20, 20, 20; |
| 77 | + --clr-fg-primary-disabled: 40, 40, 40, 0.5; |
| 78 | + |
| 79 | + --clr-fg-secondary: 80, 80, 80; |
| 80 | + --clr-fg-secondary-hover: 60, 60, 60; |
| 81 | + --clr-fg-secondary-pressed: 100, 100, 100; |
| 82 | + --clr-fg-secondary-disabled: 80, 80, 80, 0.5; |
| 83 | + |
| 84 | + --clr-brand: 43, 75, 255; |
| 85 | + --clr-brand-hover: 35, 60, 200; |
| 86 | + --clr-brand-pressed: 30, 50, 170; |
| 87 | + --clr-brand-disabled: 43, 75, 255, 0.5; |
| 88 | + |
| 89 | + --clr-onbrand: 255, 255, 255; |
| 90 | + --clr-onbrand-hover: 245, 245, 245; |
| 91 | + --clr-onbrand-pressed: 230, 230, 230; |
| 92 | + --clr-onbrand-disabled: 230, 230, 230, 0.5; |
| 93 | + |
| 94 | + --clr-danger: 200, 50, 50; |
| 95 | + --clr-danger-hover: 180, 40, 40; |
| 96 | + --clr-danger-pressed: 220, 60, 60; |
| 97 | + --clr-danger-disabled: 200, 50, 50, 0.5; |
| 98 | + |
| 99 | + --clr-success: 50, 160, 100; |
| 100 | + --clr-success-hover: 40, 140, 90; |
| 101 | + --clr-success-pressed: 60, 180, 110; |
| 102 | + --clr-success-disabled: 50, 160, 100, 0.5; |
| 103 | + |
| 104 | + --clr-component-bg: 240, 240, 240; |
| 105 | + --clr-component-bg-hover: 230, 230, 230; |
| 106 | + --clr-component-bg-pressed: 220, 220, 220; |
| 107 | + --clr-component-bg-disabled: 240, 240, 240, 0.5; |
| 108 | + |
| 109 | + --clr-code-info: 40, 120, 200; |
| 110 | + --clr-code-warn: 200, 150, 90; |
| 111 | + --clr-code-error: 180, 70, 60; |
| 112 | + --clr-code-debug: 40, 70, 200; |
| 113 | + --clr-code-trace: 40, 40, 40; |
| 114 | + |
| 115 | + --clr-link: 40, 120, 200; |
| 116 | + --clr-link-hover: 30, 100, 180; |
| 117 | + --clr-link-pressed: 20, 80, 160; |
| 118 | + --clr-link-disabled: 40, 120, 200, 0.5; |
| 119 | + |
| 120 | + --clr-page: 255, 255, 255; |
| 121 | + --clr-page-elevated: 245, 245, 245; |
| 122 | + --clr-page-pressed: 230, 230, 230; |
| 123 | + |
| 124 | + --clr-secondary: 220, 220, 220; |
| 125 | + |
| 126 | +} |
0 commit comments