I am interested to learn whether there are rendering differences between Bootstrap 3 and 4 Display Classes, given there is a 1-to-1 mapping between the class names and no perceivable other differences. So I am ignoring why this has been done.
In Bootstrap 3 you could have a Display Property like this:
<div class="hidden-xs">...</div>
In Bootstrap 4 the equivalent is:
<div class="d-none d-sm-block">...</div>
As far as I can tell, the rendered output from these 2 things is identical. So ignoring "why" the names have been changed, is there any other difference between these two statements from a rendering perspective? Or, do they do identical things?
Missing visible-** and hidden-** in Bootstrap v4 shows us that there is a 1-to-1 mapping between various Bootstrap 3 classes and the Bootstrap 4 equivalent.
Are they identical in terms of rendering or do the additional class names in Bootstrap 4 provide other functionality?
The linked post does not answer this question, because it says:
The
hidden-*
andvisible-*
classes no longer exist in Bootstrap 4. If you want to hide an element on specific tiers or breakpoints in Bootstrap 4, use thed-*
display classes accordingly.
It then goes on to show a 1-to-1 mapping for every Bootstrap 3 class name to the Bootstrap 4 equivalent. This does not confirm or deny whether there are other differences between what these display classes do in 4 vs 3. Therefore this is a legitimate question that needs a definitive answer.
Please be aware:
- The proposed duplicate does not answer this question.
- Many people use Bootstrap 3 and 4 - or are migrating from one version to another. Knowing the answer to this is useful as it helps ensure they are not changing rendering behaviour inadvertently.
- The Bootstrap 3 (or 4) docs don't answer it.