-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Customize just the padding #2216
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
Comments
If you could link specifically which page you're having an issue with, I think that would help a lot. The The Links pointing to the namespace list can be found in several places, but it's also available directly on the dedicated theme documentation page:
So essentially, you're customizing that default unit of 1 which is used everywhere spacing is involved; w-, h-, p-, m-; I guess there's no point in listing them all. Possible duplicated: #2215 (comment)
As I realized, in both issues you're referring to a specific line to point out the shortcomings, but that doesn't reflect the entirety of the documentation. |
In V3 you could set a theme.extend.spacing as the default on all utilities then add theme.extend.padding to have different units for padding. In V4 I can't see it because on https://tailwindcss.com/docs/theme#theme-variable-namespaces is only --spacing-*.
I don't see --margin-* or --padding-* on that page? |
@kocv59 these are not documented yet but these namespaces do exist for v3 compatibility and work with v4: https://play.tailwindcss.com/ACF42xLST9?file=css |
Is there a --spacing-margin-* or --spacing-padding-* like --spacing-* to set one number that applies to all margin and padding numbers. |
@kocv59 No, the spacing multiplier is shared across all spacing utilities. |
All versions before V4 you could have a different spacing for each utility. Would --spacing-margin and --spacing-padding variables be good to add so we can have same customization as before? It would give us flexibility like we have for unocss. |
Tailwind V3 docs explain how to customize just the padding or all the spacing in theme.extend.spacing or theme.extend.padding. V4 says how to customize the spacing but not the padding.
The text was updated successfully, but these errors were encountered: