Padding and alignments of buttons, etc are weird when using styled + tailwind
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- nextjs, react, tailwindcss, typescript, vite
Research direction
Start with vite-styled-tailwind/src/index.css and compare its font-size and line-height values with the Button component documentation at primereact.org/button/. Reproduce the styling in the Vite and Next.js examples, then verify that button and input padding and icon and radio alignment match the documented appearance.
Written by the indexing model from the issue text.
Description
When using Prime React with Styled + Tailwind options (Vite and Nextjs, for example), the padding on the button and the alignment of the icons/ other components is different than what is shown on the documentation page.
When using the original values in vite-styled-tailwind/src/index.css:
font-size: 16px;
line-height: 24px;
The button and the input field have excessive padding, the icon in the cutton is too low, radio buttons look normal.
Now I change the values in in vite-styled-tailwind/src/index.css:
font-size: 14px;
line-height: 18px;
to match font size: 14px used the Button Component documentation page (https://primereact.org/button/). line-height is not used there, interestingly enough.
As one can see, the buttons look different, also the alignment of the radio buttons and the icon inside the button is off:
There seems to be some issue here where Tailwind is interfering with the layout, can anyone help out? Thanks.
- Dominant language
- TypeScript
- Stars
- 140
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from primefaces/primereact-examples
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
All issues in primefaces/primereact-examples
Similar issues
-
The manager preset saves launch definitions without the required file and digest pairPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day