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
This could be a sort of silly question, and is purely for my own edification.
I know that Theme UI applies/uses some default values for certain scales. Namely, in the default theme docs the default values for the breakpoints theme key and the space key are given. I am currently putzing around with trying to write a little tutorial/blog post that explores some of Theme UI's features. I am using a default/preset theme (dark) and I can console log this theme to explore the values of the theme. But the only one of the default values mentioned in the documentation I can see on the theme is the fontSizes array. The default values shown in the documentation are indeed present when I log the theme to console. Is there a place I can see the default values for both the space and the breakpoints arrays?
For reference, for my little "project" I have the following for a theme file:
And when I log the resulting theme object to console I get something like this:
I've checked all the nested objects and find no breakpoints or space array. Curiously, if I manually add those keys to my theme, they show up in the logged theme object.
I've also used the React dev tools to inspect the context(s) provided by Theme UI and I don't see these values anywhere therein. Where would I go looking to see these default values show up in my code?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This could be a sort of silly question, and is purely for my own edification.
I know that Theme UI applies/uses some default values for certain scales. Namely, in the default theme docs the default values for the
breakpoints
theme key and thespace
key are given. I am currently putzing around with trying to write a little tutorial/blog post that explores some of Theme UI's features. I am using a default/preset theme (dark
) and I can console log this theme to explore the values of the theme. But the only one of the default values mentioned in the documentation I can see on the theme is thefontSizes
array. The default values shown in the documentation are indeed present when I log the theme to console. Is there a place I can see the default values for both thespace
and thebreakpoints
arrays?For reference, for my little "project" I have the following for a theme file:
And when I log the resulting theme object to console I get something like this:
I've checked all the nested objects and find no
breakpoints
orspace
array. Curiously, if I manually add those keys to my theme, they show up in the loggedtheme
object.I've also used the React dev tools to inspect the context(s) provided by Theme UI and I don't see these values anywhere therein. Where would I go looking to see these default values show up in my code?
Beta Was this translation helpful? Give feedback.
All reactions