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
Originally posted by joriswitteman September 12, 2022
Hi, we're looking to use CSS variables as values for Theme.fontWeights, but the typings don't allow for this. Could this be changed?
The reason we want to do this is so that both the font weight name, and the numeral weight, can be seen when inspecting elements, for QA purposes. Like so:
The type error I get is:
Type '"var(--font-weight-book-450)"' is not assignable to type 'FontWeightProperty'. ts(2322)
I think I should be allowed to set an arbitrary string here, so that I can use CSS variables.
The text was updated successfully, but these errors were encountered:
Currently, we're just exposing the types from
csstype
. We should expose our own layer of types instead and allowstring & {}
in fontWeights.Discussed in #2317
Originally posted by joriswitteman September 12, 2022
Hi, we're looking to use CSS variables as values for Theme.fontWeights, but the typings don't allow for this. Could this be changed?
The reason we want to do this is so that both the font weight name, and the numeral weight, can be seen when inspecting elements, for QA purposes. Like so:
The type error I get is:
I think I should be allowed to set an arbitrary string here, so that I can use CSS variables.
The text was updated successfully, but these errors were encountered: