Open guilherme9718 opened 1 month ago
same, even after following each step from the documentation, inputs have different aspect ratios than the doc examples, my v17 projects are fine
Hi there, you can find in the documentation information about Scale that the scale of components is based on your font-size. By default, your web browser uses 16px for font-size. And the documentation is using a font-size of 14px.
So, you can add on your style.css file something like
html { font-size: 14px; }
same, even after following each step from the documentation, inputs have different aspect ratios than the doc examples, my v17 projects are fine
Same answer
Hi there, you can find in the documentation information about Scale that the scale of components is based on your font-size. By default, your web browser uses 16px for font-size. And the documentation is using a font-size of 14px. So, you can add on your style.css file something like
html { font-size: 14px; }
PrimeNG 18 with tailwind always has larger component, text... sizes than without tailwind, regardless of whether font-size is set or not.
Describe the bug
I was creating a new application with primeng v18 and was bothered by my inputs (text input, dropdown, buttons etc..;) components size do not match the size of v18 docs inputs. I tested multiple styles to change this default size but I did'nt succeeded.
Below I show the differece in size of TextInput in Google Chrome DevTools with a v18/v17 simple project and the docs:
On v18 with Tailwind (https://stackblitz.com/edit/stackblitz-starters-lg5zvo?file=README.md)
On v17 (https://stackblitz.com/edit/stackblitz-starters-lresfo?file=package.json,src%2Fapp%2Fapp.routes.ts)
On v18 Docs (https://v18.primeng.org/inputtext)
Can you all show me what I'm doing wrong? How can I set the default size of inputs same as the v18 docs (222 x 33 pixels)?
Environment
Windows 10 Google Chrome 129.0.6668.101 64 bits
Angular: 18.2.8 Primeng: 18.0.0-beta.2 tailwind: 3.4.14 tailwindcss-primeui: 0.3.4
app.component.html
app.component.ts
styles.scss
tailwind.config.js
Reproducer
https://stackblitz.com/edit/stackblitz-starters-lg5zvo?file=README.md
Angular version
18.2.8
PrimeNG version
18.0.0-beta.2
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v20.13.1
Browser(s)
Chrome 129.0
Steps to reproduce the behavior
ng new
;<input pInputText />
and import InputTextModule in app.component.tsExpected behavior
I Expected the default size of inputs be the same as the v18 docs (222 x 33 pixels). But they are 207 x 42 pixels.