HTML Font Size REM Scaling #225
-
Hey all, Started using this component library, it's awesome! One issue I'm running into is component scaling. All of the components scale based on the document (html) font size, but what if I already use rems throughout the rest of my project and can't change the value without messing up the rest of the application? Shouldn't these components use ems instead so they can be set by parent elements? I'm trying to use the calendar component, but it's too big because it's based on 14px vs the 16px set on my document. Any work arounds for this? Thanks! Also, just wondering if this is a typo in the documentation? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Hi, Components uses rem units for size and can be override from the document.
There is no typo in the documentation. In the live demo, we prefer 14px as a base. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the response! I understand that the values can be overridden, but does it have to be every rem value for every component individually? Or is there 1 overall scale value (besides the html font size) that I can set? My project is already set to If I want to scale a calendar component, I would have to manually set every font-size, padding, width, height, etc. for every part of the component? Thank you for the help, sorry if I'm missing something on this! |
Beta Was this translation helpful? Give feedback.
-
I'm experiencing a similar issue. I really like the component sizes in your documentation, but I can't fully replicate the look, even when setting the font size to 14px. I'm using PrimeVue with the Aura theme and the Noir override, along with Tailwind. What could be causing this difference? |
Beta Was this translation helpful? Give feedback.
-
I think it's a major drawback for using PrimeVue and PrimeBlocks. All components which are designed for copy + paste for rapid development are styled with TailwindCSS and a base font-size of 14px. Which makes PrimeVue incompatible with any other TailwindCSS components wich do not enforce any base font-size on the document level. The whole point of Tailwind and mixing and matching components from different sources is hereby destroyed. The components of PrimeBlocks should have been designed with the base font size of modern browsers, which is 16px - not 14px. |
Beta Was this translation helpful? Give feedback.
Hi,
Components uses rem units for size and can be override from the document.
There is no typo in the documentation. In the live demo, we prefer 14px as a base.