diff --git a/core/scss/_props.scss b/core/scss/_props.scss index d0cc83ed3..2d31aed58 100644 --- a/core/scss/_props.scss +++ b/core/scss/_props.scss @@ -42,9 +42,9 @@ --#{$prefix}#{$name}-lt-rgb: #{to-rgb(theme-color-lighter($color))}; } - /** Social colors */ - @each $name, $color in $social-colors { - --#{$prefix}#{$name}: #{$color}; + /** Gray colors */ + @each $name, $color in $gray-colors { + --#{$prefix}#{$name}-fg: #{if(contrast-ratio($color, white) > $min-contrast-ratio, var(--#{$prefix}white), var(--#{$prefix}body-color))}; } /** Spacers */ diff --git a/core/scss/_variables.scss b/core/scss/_variables.scss index b87e20b8f..913dedcc2 100644 --- a/core/scss/_variables.scss +++ b/core/scss/_variables.scss @@ -279,6 +279,7 @@ $gray-colors: ( gray-700: $gray-700, gray-800: $gray-800, gray-900: $gray-900, + gray-950: $gray-950, ) !default; $theme-colors: map-merge($theme-colors, map-merge($extra-colors, ())); diff --git a/core/scss/utils/_colors.scss b/core/scss/utils/_colors.scss index 94cd1d103..f5111530e 100644 --- a/core/scss/utils/_colors.scss +++ b/core/scss/utils/_colors.scss @@ -64,7 +64,7 @@ } .text-#{"" + $color}-fg { - color: $value !important; + color: var(--#{$prefix}#{$color}-fg) !important; } } @@ -75,7 +75,7 @@ } .text-#{"" + $color}-fg { - color: $value !important; + color: var(--#{$prefix}#{$color}-fg) !important; } } diff --git a/preview/pages/buttons.html b/preview/pages/buttons.html index de9ffae34..44b4c2812 100644 --- a/preview/pages/buttons.html +++ b/preview/pages/buttons.html @@ -81,7 +81,7 @@ permalink: buttons.html

Icon buttons

- {% include "parts/buttons-table.html" variants=site.socials hide-labels=true icon-only=true auto-columns=true %} + {% include "parts/buttons-table.html" variants=site.socialColors hide-labels=true icon-only=true auto-columns=true %}
@@ -91,7 +91,7 @@ permalink: buttons.html

Social colors

- {% include "parts/buttons-table.html" variants=site.socials hide-labels=true icon=true auto-columns=true %} + {% include "parts/buttons-table.html" variants=site.socialColors hide-labels=true icon=true auto-columns=true %}
diff --git a/preview/pages/colors.html b/preview/pages/colors.html index ed077613a..bdb6145b4 100644 --- a/preview/pages/colors.html +++ b/preview/pages/colors.html @@ -10,63 +10,97 @@ permalink: colors.html {% for color in site.colors %} {% assign colors = colors | push: color[0] %} {% endfor %} -{% assign colors = colors | push: 'dark' %} +
-
+
-
- - - {% for color in colors %} - - {% endfor %} - - - {% for color in colors %} - - {% endfor %} - - - {% for color in colors %} - - {% endfor %} - - - {% for color in colors %} - - {% endfor %} - - - {% for color in colors %} - - {% endfor %} - - - {% for color in colors %} - - {% endfor %} - -
-
{{ color | slice: 0, 2 }} +
+ {% for color in site.colors %} +
+
+
+
+ {{ color[1].abbr }}
-
-
{{ color | slice: 0, 2 }}
-
-
{{ color | slice: 0, 2 }} +
+
+ {{ color[1].title }}
+ {{ color[1].hex }} +
+ + + {% endfor %} + + + + +
+
+
+
+ {% for color in site.lightColors %} +
+
+
+
+ {{ color[1].abbr }}
-
-
{{ color | slice: 0, 2 }} +
+
+ {{ color[1].title }}
+ {{ color[1].hex }} +
+ + + {% endfor %} + + + + +
+
+
+
+ {% for color in site.grayColors %} +
+
+
+
+ {{ color[1].abbr }}
-
- {% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %} -
{{ c | slice: 0, 2 }}
-
- {% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %} -
{{ c | slice: 0, 2 }}
-
-
+
+
+ {{ color[1].title }}
+ {{ color[1].hex }} +
+
+
+ {% endfor %} +
+
+
+ +
+
+
+
+ {% for color in site.socialColors %} +
+
+
+
+ {% include "ui/icon.html" icon=color[1].icon %} +
+
+
+ {{ color[1].title }}
+ {{ color[1].hex }} +
+
+
+ {% endfor %}
@@ -87,7 +121,7 @@ permalink: colors.html
- {% for color in colors %} {% endfor %} @@ -95,7 +129,7 @@ permalink: colors.html
- {% for color in colors %}