You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we've got a smattering of colors available in cryptically named utility classes like text-gray-dark ($gray-900) and bg-green-light ($green-100). We'd like to make the full color palette available as foreground and background utilities, i.e. as .text-gray-9 and .bg-green-1.
We're aiming for parity with Primer Components, which expose "theme-aware" props for foreground and background:
color="blue.4" is equivalent to color={theme.colors.blue[4]}
bg="gray.1" is equivalent to bg={theme.colors.gray[1]}
and in which our theme's colors object contains arrays of values for each hue. The $hue-X00 naming scheme is (in @broccolini's words) an artifact of a previous color scheme, so we'd like to eventually — and in a semver-friendly way — rename or alias these to $hue-X so that they match the utility class names.
We'll probably still suggest the use of -light and -dark utilities for general use, and to reduce the confusion around which shade of a given hue can/should be used in most contexts. But this change will make it easier to track down which shade those utilities use, and offer a broader palette on which new components can be built in HTML alone.
The text was updated successfully, but these errors were encountered:
Right now we've got a smattering of colors available in cryptically named utility classes like
text-gray-dark
($gray-900
) andbg-green-light
($green-100
). We'd like to make the full color palette available as foreground and background utilities, i.e. as.text-gray-9
and.bg-green-1
.We're aiming for parity with Primer Components, which expose "theme-aware" props for foreground and background:
color="blue.4"
is equivalent tocolor={theme.colors.blue[4]}
bg="gray.1"
is equivalent tobg={theme.colors.gray[1]}
and in which our theme's
colors
object contains arrays of values for each hue. The$hue-X00
naming scheme is (in @broccolini's words) an artifact of a previous color scheme, so we'd like to eventually — and in a semver-friendly way — rename or alias these to$hue-X
so that they match the utility class names.In other words, something like:
We'll probably still suggest the use of
-light
and-dark
utilities for general use, and to reduce the confusion around which shade of a given hue can/should be used in most contexts. But this change will make it easier to track down which shade those utilities use, and offer a broader palette on which new components can be built in HTML alone.The text was updated successfully, but these errors were encountered: