[v4-alpha] Missing responsive classes d-xs-{block,display,none}
See original GitHub issueI just wrote a small debugging label indicating the current breakpoint as follows:
<div style="position:fixed; top: 30px; right: 75px; background-color: rgba(255,0,0,0.1)">
<span class="d-none d-xs-block d-sm-none">XS</span>
<span class="d-none d-sm-block d-md-none">S</span>
<span class="d-none d-md-block d-lg-none">M</span>
<span class="d-none d-lg-block d-xl-none">L</span>
<span class="d-none d-xl-block">XL</span>
</div>
This shows the current breakpoint fine, except XS: there’s are no classes called d-xs-block
or d-xs-none
.
This is actually preventing me from defining my own custom breakpoint such as XXS and being able to test it. To preserve the symmetry, classes:
- d-xs-block
- d-xs-display
- d-xs-none
should be provided.
To solve my initial problem and make the snippet above work, I had to change the line to:
<span class="d-sm-none">XS</span>
which looks like a corner case handling. If the aforementioned classes were provided, I would’ve preserved the symmetry in the code just fine. Not to mention, I think d-none d-xs-block
is a valid use case when someone like me defines classes smaller than xs, such as xxs.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Missing visible-** and hidden-** in Bootstrap - Stack Overflow
The hidden-* and visible-* classes no longer exist in Bootstrap 4. If you want to hide an element on specific tiers or breakpoints...
Read more >Display property - Bootstrap
Change the value of the display property with our responsive display utility classes. We purposely support only a subset of all possible values...
Read more >How to hide elements in Bootstrap 4 - Educative.io
display : none; : This property removes the element from the document flow, and other elements behave as if the hidden element is...
Read more >Bootstrap 4 Hidden & Visible. How Responsive Display Works ...
If you want to hide an element on specific tiers (breakpoints) in Bootstrap 4, use the `d-*` display classes accordingly.
Read more >Bootstrap 4. Hide content in different ways. - YouTube
Hide and Visible have been discontinued. Bootstrap 4 now uses variations on d-none.How do I show and hide things at specific sizes with ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
xs
breakpoint specific classes still exist, but the classes don’t include that infix. Instead of.d-xs-none
, it’s.d-none
as those styles are never bound to a media query—they apply frommin-width: 0
and up, across all viewports.Also, please refer to StackOverflow and Slack for how-to questions. I’m going to lock this thread given it’s a not a bug or feature request, and there’s no problem to resolve.