Width / Height utility percentage value names #42183
Replies: 2 comments 1 reply
-
|
Not opposed. I've wondered how we would do this in a good and approachable way. Would need to see a full size scale mapped out to see how our components would slot into those. I see it being similar but hopefully not the same. We don't need every utility that Tailwind has, and I'm always curious about the use cases here. Oh, and v6 is the time to do this stuff; breaking changes are the name of the game. |
Beta Was this translation helpful? Give feedback.
-
|
We don't have to add extra size properties, just to rename the properties that are currently getting in the way of expanding the I've done this in Bootstrap 6 and the CSS is almost identical 🥳. Before: 275 KB (282,257 bytes) Just 117 bytes in difference.
We can also now have Functionally, it gained two new extra classes: The And for those who need more, the map already provides hints to how it can be expanded, for example one could implement other size units, such as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
LATER EDIT
I'd like to suggest changing the percentage based utility names from:
to:
So rather than writing
w-50, you'd be writingw-50/100.The scope of this change is that it frees up the
$sizes, so that we can extend it as much as we need. For example it would open up the possibility of using$sizeswith smaller increments, such as.25rem(similar to Tailwind), without quickly overlapping with the percentage value classes.This also means that people can just chip-in additional percentage based values, such as
w-100by setting10\/100: 10%for10%without interfering with thew-10which is set to10rem, and also just be consistent across multiple projects that may be using Bootstrap.This would apply to
w,h,min-w,max-w,min-viewport-width,min-viewport-height.I feel like this would be a good change for the Bootstrap framework as a whole.
However, this would be a breaking change, and I understand why you wouldn't want to do that.
Beta Was this translation helpful? Give feedback.
All reactions