Skip to content

Document --spacing #2215

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

Open
kocv59 opened this issue Apr 19, 2025 · 4 comments
Open

Document --spacing #2215

kocv59 opened this issue Apr 19, 2025 · 4 comments

Comments

@kocv59
Copy link

kocv59 commented Apr 19, 2025

Theme documentation says --spacing is used for px and max-h but not the others. A list of all utilities that use it should be somewhere on the page.

@rozsazoltan
Copy link

rozsazoltan commented Apr 20, 2025

I don't quite understand. On every page, it's clearly visible whether it's being used or not:

When is it used? Anytime you need to calculate any kind of sizing. The spacing represents a default unit, and from there, every w-, h-, p-, m-, etc. class uses this unit for its calculations.

and many more

Source: https://tailwindcss.com/docs/theme#theme-variable-namespaces

Image

Image

Image

Image

Image

@kocv59
Copy link
Author

kocv59 commented Apr 20, 2025

The pages that use --spacing show it like your screenshots but there's no place with a list of all those pages.

https://tailwindcss.com/docs/theme#theme-variable-namespaces says Spacing and sizing utilities like px-4, max-h-16, and many more. There could be an extra section about --spacing that links all the pages that use it like https://tailwindcss.com/docs/padding and https://tailwindcss.com/docs/min-height and the pages from your screenshots.

@philipp-spiess
Copy link
Member

@kocv59 I understand the motivation but I'm not sure about the practicality of what you're suggesting. When we work on adding new utilities we usually only update the page of the specific utility so it I worry that it would make things a bit complex to have to remember to add all the backlinks to another page.

I'm curious why you want an exhaustive list for this, though?

@kocv59
Copy link
Author

kocv59 commented Apr 24, 2025

I'm curious why you want an exhaustive list for this, though?

If you want to change the --spacing number you know all the places to look where to see the changes.

When we work on adding new utilities we usually only update the page of the specific utility so it I worry that it would make things a bit complex to have to remember to add all the backlinks to another page.

It's more complex for all users to click on all the utility pages and see if --spacing is anywhere in the page instead of developers changing it once in rare cases new utility that uses --spacing is added.

If you add a new utility that uses --spacing you only need to make one change to the list of --spacing utilities to add link to the new page for the new utility. What more backlinks are there?

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

3 participants