Skip to content
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

Add size utilities (shorthand for width and height) #1288

Closed
wants to merge 2 commits into from
Closed

Add size utilities (shorthand for width and height) #1288

wants to merge 2 commits into from

Conversation

benface
Copy link
Contributor

@benface benface commented Dec 29, 2019

It's been suggested a few times, and I think it deserves to be in the core. With this PR, w-4 h-4 could be rewritten as size-4. It follows the same principle as other shorthand utilities such as inset-*, m-*, p-*, etc. Like inset-*, it doesn't use an actual CSS shorthand property since it doesn't exist yet, but there are plans for it. Instead, the new size core plugin sets the width and height properties to the same value, and size-* utilities are overridden by w-* and h-* since those appear later in the CSS.

@adamwathan
Copy link
Member

I definitely think this would be convenient but not sure about adding something to core while the official shorthand property name is still in such flux. It's also only one character shorter for most cases:

h-4 w-4
size-4

Going to close for now but can always explore again down the road.

@adamwathan adamwathan closed this Feb 1, 2020
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

Successfully merging this pull request may close these issues.

2 participants