Why?
This:
.action {
@extend .ml-3;
}will generate the equivalent to this:
.action {
margin-left: 1rem !important;
}Ahhh, !important!!1 Noooo
There must be a better way:
.action {
@include ml(3);
}Makes:
.action {
margin-left: 1rem;
}This therefore gets you not-!important, convenient access to the Bootstrap 4 sizings,
with a clear path to extraction of inline classes into css. But there are other goodies:
For negative margins of the standard sizes:
@include mr(-2);margin-right: -0.5rem;To set two ends at once without setting the others:
@include px(3);padding-left: 1rem;
padding-right: 1rem;Most useful with the X/Y conveniences, but good with the rest as well:
@include my(2.3em);
@include p(3vh);margin-top: 2.3em;
margin-bottom: 2.3em;
padding: 3vh;@include ml(auto);margin-left: auto;Useful in calculations or to use standard sizings in other properties. bsize is for "bootstrap size".
border-width: bsize(2);border-width: 0.5rem;Because you should just use the @include media-breakpoint-{up,down,etc} utilities.
This is awesome!
Do you plan to develop it further, with Bootstrap 4 breakpoints system (cf https://getbootstrap.com/docs/4.0/utilities/spacing/#notation, {property}{sides}-{breakpoint}-{size} notation)?