-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
v4: The Utilities Update #20684
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
v4: The Utilities Update #20684
Conversation
…erty}{side} without the extra dash
- Rather than mix multiple properties in our color utilities, this splits all color and all background utils into separate classes. - Adds new .text-white class to help lighten text color for darker backgrounds
- Move and rename .img-rounded to .rounded, .img-circle to .rounded-circle - Add new .rounded-{direction} utils - New docs pages for border utils with TBD comments for the border property - Removes most image examples for rounding from the content/images docs in favor of new docs page
You'll need to remove |
Creating max-width images is not dependent on the display, so setting it is redundant. Cleans up the comments and implementation of the mixin as well. Fixes #20767
|
.#{$abbrev}-r-#{$size} { #{$prop}-right: $length-x !important; } | ||
.#{$abbrev}-b-#{$size} { #{$prop}-bottom: $length-y !important; } | ||
.#{$abbrev}-l-#{$size} { #{$prop}-left: $length-x !important; } | ||
.#{$abbrev}-#{$size} { #{$prop}: $length-y $length-x !important; } // a = All sides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this supposed to have the -a-?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Think of it like the CSS properties—margin-left
goes with m-l
while margin
goes with m
.
Addressing a ton of things in one massive PR around our utilities. We've already broken each group of utilities out into new pages with #20068, and now I'm cleaning things up to make utilities more granular, easier to use, and more flexible to a multitude of use cases.
.pa-*
/.ma-*
to just.p-*
and.m-*
to avoid a weird and unclear abbreviation of "all" there.color
; you now apply that with a separate utility for more control. Also new is a.text-white
for those common cases where you just want white text on dark background..img-rounded
an.img-circle
to.rounded
and.rounded-circle
. Also, add new utilities for rounding a complete side of an element (e.g.,.rounded-top
or.rounded-right
). (Pulls in commits from Renames .img-rounded to .rounded #20363 to fix Rename .img-rounded to .rounded #20266.)display: block;
from.img-fluid
. Responsive image behavior is not dependent ondisplay: block;
, so we can safely remove it on our end. Should you need block level, you can easily override that in the source or with a utility class.Still to do:
.pull-*
classes to reflect their CSS property,.float-*
.Update all instances of background utilities to ensure color contrast.Punting.Consider reorganizing these new utility docs a bit more (e.g., combine display and responsive display, combine floats and clearfix, or something to that effect).Punting.!important
.Add vertical alignment utilitiesPunting to 4.1 ideas in Add vertical-align utilities #20866Am I missing anything else major?