chota icon indicating copy to clipboard operation
chota copied to clipboard

remove font-size: 62.5% hack

Open lionel-rowe opened this issue 3 years ago • 1 comments

For reasons given by user @lcech on a comment on the blog post Respecting Font Size Preferences: Rems and 62.5% Base Font Size:

This is a good idea, unless it isn't. E.g. when you don't have 100% control over all the CSS on your website. Think of 3rd party components (e.g. cookie consents so popular these days, online chats, etc.), libraries like Bootstrap etc. - these sometimes expect that the root font-size is somewhat reasobanle and therefore use rem as well. But if you change the root font-size, suddenly those 3rd party components act accordingly.

It seems likely to me that the use case where Chota has to play nicely with at least some other non-user-defined CSS is going to be much more common than the use case where it doesn't.

If modifying the base library isn't feasible or desirable, perhaps an alternative build could be provided that simply divides all rem values by 1.6?

lionel-rowe avatar Feb 04 '22 18:02 lionel-rowe

I just found about this hack that is unfortunately not documented anywhere explicitly, although tbf I should have sat up when reading

--grid-maxWidth: 108rem; /* max container width 1080px */

Unfortunately this does not fly nowadays. Having all kinds of 3rd party widgets and stuff on the page means they are all scaled down. Are there any news on in https://github.com/jenil/chota/pull/80 ?

minusf avatar Dec 04 '24 16:12 minusf