question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4-alpha] Missing responsive classes d-xs-{block,display,none}

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mdocommented, Jul 13, 2017

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 from min-width: 0 and up, across all viewports.

0reactions
mdocommented, Jan 2, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found