Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles should not rely on base font-size #380

Open
frankmichel opened this issue Jan 18, 2025 · 0 comments
Open

Styles should not rely on base font-size #380

frankmichel opened this issue Jan 18, 2025 · 0 comments

Comments

@frankmichel
Copy link

frankmichel commented Jan 18, 2025

First of all, great work on everything! The Tailwind preset looks great. However, there is one major issue with it. Since it requires a base font-size of 14px to be set on the html tag, it makes all other Tailwind-styled components incompatible which do not share this same base font-size.

Tailwind itself styles its components based on the default font-size of modern browsers, which is 16px. So no base font-size is set on the html tag.

Since not only font-sizes, but all kinds of size-based styles (width, height, spacing, etc.) are relative to the base font size (since Tailwind is using rem) it makes Primevue incompatible with any other Tailwind styled html component. It breaks app designs with existing Tailwind layouts. Or Primevue components are way bigger than displayed in the documentation (and bigger than they should be).

I think it is strongly recommended to remove the 14px restriction and restyle all components without the need of any base font-size. This way Primevue will be much more compatible with other frameworks, templates and snippets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant