diff options
Diffstat (limited to 'src/_vars.scss')
| -rw-r--r-- | src/_vars.scss | 70 | 
1 files changed, 49 insertions, 21 deletions
| diff --git a/src/_vars.scss b/src/_vars.scss index 8531715..6d273f4 100644 --- a/src/_vars.scss +++ b/src/_vars.scss | |||
| @@ -30,18 +30,11 @@ media.$unit-intervals: ( | |||
| 30 | --lg: 1.5, | 30 | --lg: 1.5, | 
| 31 | --xl: 2, | 31 | --xl: 2, | 
| 32 | ), | 32 | ), | 
| 33 | --x: ( | 33 | --xs: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --xs, null)), | 
| 34 | --sm: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --sm, null)), | 34 | --sm: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --sm, null)), | 
| 35 | --md: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --md, null)), | 35 | --md: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --md, null)), | 
| 36 | --lg: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --lg, null)), | 36 | --lg: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --lg, null)), | 
| 37 | ), | 37 | --xl: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --xl, null)), | 
| 38 | --y: ( | ||
| 39 | --xs: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --xs, null)), | ||
| 40 | --sm: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --sm, null)), | ||
| 41 | --md: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --md, null)), | ||
| 42 | --lg: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --lg, null)), | ||
| 43 | --xl: calc(fn.dim(--spacing --base, null) * fn.dim(--spacing --factors --xl, null)), | ||
| 44 | ), | ||
| 45 | ), | 38 | ), | 
| 46 | 39 | ||
| 47 | --font: ( | 40 | --font: ( | 
| @@ -75,7 +68,7 @@ media.$unit-intervals: ( | |||
| 75 | --focus-outline-width: 3px, | 68 | --focus-outline-width: 3px, | 
| 76 | 69 | ||
| 77 | --paragraph: ( | 70 | --paragraph: ( | 
| 78 | --margin-top: fn.dim(--spacing --y --sm, null), | 71 | --margin-top: fn.dim(--spacing --sm, null), | 
| 79 | ), | 72 | ), | 
| 80 | 73 | ||
| 81 | --list: ( | 74 | --list: ( | 
| @@ -86,15 +79,15 @@ media.$unit-intervals: ( | |||
| 86 | 79 | ||
| 87 | // | 80 | // | 
| 88 | 81 | ||
| 89 | @function accent-palette($base) { | 82 | @function accent-palette($base, $dir: 1) { | 
| 90 | @return ( | 83 | @return ( | 
| 91 | --hi: blend.scale($base, $lightness: 15%, $chroma: 20%), | 84 | --hi: blend.scale($base, $lightness: $dir * 15%, $chroma: $dir * 10%), | 
| 92 | --main: $base, | 85 | --main: $base, | 
| 93 | --lo: blend.scale($base, $lightness: -15%, $chroma: -20%), | 86 | --lo: blend.scale($base, $lightness: $dir * -15%, $chroma: $dir * -10%), | 
| 94 | --lo2: blend.scale($base, $lightness: -25%, $chroma: -40%), | 87 | --lo2: blend.scale($base, $lightness: $dir * -25%, $chroma: $dir * -20%), | 
| 95 | --semi: rgba($base, .4), | 88 | --semi: rgba($base, .4), | 
| 96 | --selection: rgba($base, .99), | 89 | --selection: rgba($base, .99), | 
| 97 | --fg: #fff, | 90 | --fg: blend.contrast($base, #fff, #000), | 
| 98 | ); | 91 | ); | 
| 99 | } | 92 | } | 
| 100 | 93 | ||
| @@ -178,15 +171,50 @@ media.$unit-intervals: ( | |||
| 178 | 171 | ||
| 179 | @include iro.fn-execute { | 172 | @include iro.fn-execute { | 
| 180 | @include iro.props-store(( | 173 | @include iro.props-store(( | 
| 181 | --colors: () | 174 | --colors: ( | 
| 175 | --accent: ( | ||
| 176 | --blue: accent-palette(blend.lch(58% 60 279), -1), | ||
| 177 | --red: accent-palette(blend.lch(58% 60 23), -1), | ||
| 178 | --green: accent-palette(blend.lch(68% 60 141), -1), | ||
| 179 | --yellow: accent-palette(blend.lch(83% 60 90), -1), | ||
| 180 | |||
| 181 | --primary: iro.props-ref('colors-dark', --colors --accent --blue), | ||
| 182 | --error: iro.props-ref('colors-dark', --colors --accent --red), | ||
| 183 | --success: iro.props-ref('colors-dark', --colors --accent --green), | ||
| 184 | ), | ||
| 185 | ) | ||
| 182 | ), 'colors-dark'); | 186 | ), 'colors-dark'); | 
| 183 | 187 | ||
| 184 | @include iro.props-store(( | 188 | @include iro.props-store(( | 
| 185 | --colors: () | 189 | --colors: ( | 
| 190 | --gray1: hsl(210, 0%, 6%), // 1.1 | ||
| 191 | --gray2: hsl(210, 0%, 8%), // 1.05 | ||
| 192 | --gray3: hsl(210, 0%, 10%), // 1 | ||
| 193 | --gray4: hsl(210, 0%, 14%), // 1.12 | ||
| 194 | --gray5: hsl(210, 0%, 20%), // 1.37 | ||
| 195 | --gray6: hsl(210, 0%, 26%), // 1.73 | ||
| 196 | --gray7: hsl(210, 0%, 34%), // 2.4 | ||
| 197 | --gray8: hsl(210, 0%, 42%), // 3.26 | ||
| 198 | --gray9: hsl(210, 0%, 65%), // 7.14 | ||
| 199 | --gray10: hsl(210, 0%, 86%), // 12.57 | ||
| 200 | --gray11: hsl(210, 0%, 100%), // 17.4 | ||
| 201 | ) | ||
| 186 | ), 'palette-dark'); | 202 | ), 'palette-dark'); | 
| 187 | 203 | ||
| 188 | @include iro.props-store(( | 204 | @include iro.props-store(( | 
| 189 | --colors: () | 205 | --colors: ( | 
| 206 | --gray1: hsl(210, 0%, 10%), // 1.12 | ||
| 207 | --gray2: hsl(210, 0%, 12%), // 1.06 | ||
| 208 | --gray3: hsl(210, 0%, 14%), // 1 | ||
| 209 | --gray4: hsl(210, 0%, 18%), // 1.14 | ||
| 210 | --gray5: hsl(210, 0%, 23%), // 1.38 | ||
| 211 | --gray6: hsl(210, 0%, 29%), // 1.75 | ||
| 212 | --gray7: hsl(210, 0%, 37%), // 2.39 | ||
| 213 | --gray8: hsl(210, 0%, 45%), // 3.27 | ||
| 214 | --gray9: hsl(210, 0%, 69%), // 7.15 | ||
| 215 | --gray10: hsl(210, 0%, 90%), // 12.43 | ||
| 216 | --gray11: hsl(210, 0%, 100%), // 15.52 | ||
| 217 | ) | ||
| 190 | ), 'palette-dark-raised'); | 218 | ), 'palette-dark-raised'); | 
| 191 | } | 219 | } | 
| 192 | 220 | ||
