WordPress / wporg-gutenberg

The theme for https://wordpress.org/gutenberg/
https://wordpress.org/gutenberg/
10 stars 5 forks source link

Responsive text #35

Closed beafialho closed 2 years ago

beafialho commented 2 years ago

When browsing the page on mobile size, all the buttons text looks much smaller than the intended 18px. Can we match that to the mockup?

Captura de ecrã 2022-04-28, às 10 36 13 Captura de ecrã 2022-04-28, às 10 49 21

Also, can we use clamp to make larger text smaller on mobile? This includes headings as well.

For instance, in this section the mockup uses 36px on desktop and 24px on mobile, is that the size we're using here too?

Captura de ecrã 2022-04-28, às 10 48 22 Captura de ecrã 2022-04-28, às 10 46 49
StevenDufresne commented 2 years ago

The block editor doesn't have a graceful way of managing responsive text (I think?). In order to get the text responsive, I've converted the font sizes to rem units and changed the base font size on mobile. We could use clamp but I'm pretty sure we'll have to do it with custom CSS. We could set defaults using clamp, but anyone who would update afterward would overwrite it and the document would probably fall out of sync. As I mentioned in #31, ideally we are left with a site that can be updated entirely (almost) in the block editor.

I didn't do much of a font-size audit, some of it was from the original copy/paste and I'm sure some have drifted. So how about, I update the font sizes to match the designs but we stick with the rem unit? If we still think proportions are askew, we can move to a slightly more hard-coded theme. Thoughts?

StevenDufresne commented 2 years ago

Actually, after a bit more research, it looks like I can use it within the theme.json which should still make it flexible. I'll try that first :)

StevenDufresne commented 2 years ago

@beafialho Can you check the test site? I made some responsive text updates. Thanks :)

beafialho commented 2 years ago

Thanks @StevenDufresne, it's looking and working great!

I have only two comments:

Currently Mockup
Captura de ecrã 2022-05-03, às 10 02 50 Captura de ecrã 2022-05-03, às 10 05 49
StevenDufresne commented 2 years ago

Alright, updated. Closing this issue for now.

In terms of future edits to padding and font sizes, etc..., I think it should be viewed as a content update... I'm not sure who managed those for .org 🤔

beafialho commented 2 years ago

Thanks for updating, it looks spot on now.