Comments (1)
Hey there,
First of all, we don't recommand to introduce classes that could be mimic in another way and as you said, it's quite easy to mimic this behavior atm. Furthermore, we try as much as possible to have a mobile first approach.
Since we don't remove unused CSS, we try to limit the number of classes we introduce.
In a second time, I'd consider to introduce those classes manually.
That said, you don't need to change anything in our mixin. Here is a two step process to get what you need.
I just tried this (naming might be reworked and code might be optimized):
Inside scss/utilities/_api.scss
@each $breakpoint1 in map-keys($grid-breakpoints) {
@each $breakpoint2 in map-keys($grid-breakpoints) {
$i1: index(map-keys($grid-breakpoints), $breakpoint1);
$i2: index(map-keys($grid-breakpoints), $breakpoint2);
@if $i1 < $i2 {
@include media-breakpoint-between($breakpoint1, $breakpoint2) {
$infix: #{breakpoint-infix($breakpoint1, $grid-breakpoints) + breakpoint-infix($breakpoint2, $grid-breakpoints) + "-between"};
// Loop over each utility property
@each $key, $utility in $utilities {
@if type-of($utility) == "map" and (map-get($utility, between-responsive) or $infix == "") {
@include generate-utility($utility, $infix);
}
}
}
}
}
}
Inside scss/_utilities.scss
"display": (
responsive: true,
between-responsive: true, // Only new line
print: true,
property: display,
class: d,
values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex none
),
And here are the results (only few)
@media (max-width: 479.98px) {
.d-sm-between-inline {
display: inline !important;
}
.d-sm-between-inline-block {
display: inline-block !important;
}
...
}
@media (max-width: 767.98px) {
.d-md-between-inline {
display: inline !important;
}
.d-md-between-inline-block {
display: inline-block !important;
}
...
}
...
@media (max-width: 1439.98px) {
.d-xxl-between-inline {
display: inline !important;
}
.d-xxl-between-inline-block {
display: inline-block !important;
}
...
}
@media (min-width: 480px) and (max-width: 767.98px) {
.d-sm-md-between-inline {
display: inline !important;
}
.d-sm-md-between-inline-block {
display: inline-block !important;
}
...
}
...
@media (min-width: 1280px) and (max-width: 1439.98px) {
.d-xl-xxl-between-inline {
display: inline !important;
}
.d-xl-xxl-between-inline-block {
display: inline-block !important;
}
...
}
This code generates .75kB
of CSS.
Once more, prefer using another approach and if you use this, please make sure to clean all unused CSS with any tool like PurgeCSS.
from bootstrap.
Related Issues (20)
- Flex gap HOT 4
- Range component inside a card is impossible to see
- Modal "close" button using dark variant not aligned to the right HOT 5
- Padding left and right utilities not working as expected HOT 1
- Carousel moves in reverse direction on iOs safari browser HOT 3
- `aria-disabled` buttons should have same CSS as `disabled` HOT 7
- Docs: No info about the collapse plugin supporting checkboxes as toggles
- input-group + <input type=color> doesn't use whole height HOT 2
- Facing install issue on PPC64LE architecture
- `tooltip.js` error with table editable HOT 3
- Can a react web app have both a Modal Component, and Off-canvas nav menu. When I use both strip and Import. the drop-down toggle in Off-canvas nav does not respond HOT 3
- We need more customizable color scheme for accordion HOT 4
- accent-color can reduce the style size of the current input check box, radio button, and slider. HOT 1
- Documentation page contains YouTube video of Reo Speedwagon
- Potential for contrast issues with '.btn-close' class HOT 2
- Carousel returns incorrect (reversed) directions HOT 3
- Loading of an image is failed under status heading in README.md HOT 1
- Support tables in cards (Gist provided)
- change-version.mjs should also change content aliases links HOT 2
- Quick click issue when during offcanvas opening
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap.