Documentation not clear for beginners #1935
-
Hello there,
Now, I've assumed some of those constraint were made by default by What I mean, from my understanding, these constraints are only set by the developer by customizing all the possible (but limited) choices of the theme fields. What I mean, for example, not being a designer myself, I don't know which line I've assumed someone else made these choices for me and packed them up into a...theme, but that's not the case. The same applies for breakpoint and media queries, the lack of defaults just puzzles me, how is that possible that I have to define all of these commonly used defaults? Another misunderstood concept: none of the value defined into the theme are automatically mapped to html elements by default so I guess I would have to add those value myself. That mean that if I want to assign all the
And then use the All of this is just confusing 😕 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am probably quite late to the party, but here goes.
You can copy an existing theme and start using it if that's what you'd like. Theme UI is a framework for theming, not a theme. I don't think it's such a huge issue to find the right padding/margin/size for your purposes. And to make it responsive to screen sizes you can use breakpoints like so: <Box sx={{ m: [2, 3, 4], borderRadius: [3, 3, 2], borderColor: 'secondary' }}>
<Text sx= {{ fontSize: [4, 3, 3] }}>Hello there!</Text>
</Box> Tweak the values so they look nice for your component, and there you are. If you use the same values in many places you can define variants (which would function quite like a html class) so you can do this: <Text variant={"helloText"}>Hello there!</Text>
You shouldn't use Likewise you shouldn't use I would start with the theme from the docs to get the arrays with the sizes and stuff, and add more as needed (such as Here's a theme with a demo page you can look at to see a real world example. |
Beta Was this translation helpful? Give feedback.
I am probably quite late to the party, but here goes.
You can copy an existing theme and start using it if that's what you'd like. Theme UI is a framework for theming, not a theme.
I don't think it's such a huge issue to find the right padding/margin/size for your purposes. And to make it responsive to screen sizes you can use breakpoints like so:
Tweak the values so they look ni…