Closed brettinternet closed 4 years ago
It's meant to provide a pretty through default set of styles that are still completely controllable by you through the typography.js API. Table styling is still typography :-D
@KyleAMathews Thanks for the reply!
This is actually misleading. Because this library is called Typography, so it should deal with only fonts? And No, table is not a typography. Alternatively we could be very clear that this library acts as a sort of theming / styling framework and that actually may cause problems.
Example:
I have a gatbsy site that uses Typography (in fact in came with typograhpy), and I try to add a material ui table https://material-ui.com/components/tables/#structure and I encounter that the table looks off, after some digging I found this rule https://github.com/KyleAMathews/typography.js/blob/34a98113ac6117ca74a8641adab9be8994abfe9f/packages/typography/src/utils/createStyles.js#L233 that I cannot remove.
So at least it would be nice to opt out of this "default" super "opinionated" styles.
Examples:
I guess my only recommendation would be to add proper docs about the amount of styles that libs adds that go far beyond typography and additionally add a way to opt out of some of them.
I might be able to help.
Fran
I have the same problem. I like the module, I like a specific theme, but I would like to unset the colors in the theme so links and titles follow the general colors of my site. Of course, I could set them in both places, but it's not elegant (specially that I'm building a customizable starter pack).
My only solution is to dig in the theme and copy-paste the values. It'd be much easier if instead of a method, the styles were provided as an object; then we could easily intervene and remove or add whatever we want.
Still an awesome package, but having the base theme styles as a flat object would fix a lot of fiddling.
Why are some styles created by the Typography.js package so opinionated? For example, some table cells have styles added to them. Is this related to some aspect of web typography?