Skip to content

Instantly share code, notes, and snippets.

@WebDevSimplified
Last active April 29, 2024 19:52
Show Gist options
  • Star 54 You must be signed in to star a gist
  • Fork 29 You must be signed in to fork a gist
  • Save WebDevSimplified/d7deffbd6631834003ad07ca60aaf906 to your computer and use it in GitHub Desktop.
Save WebDevSimplified/d7deffbd6631834003ad07ca60aaf906 to your computer and use it in GitHub Desktop.
This stylesheet adds text describing the current Bootstrap Breakpoint in the top right corner of the screen.
body {
margin-top: 40px; /* This margin just makes the text easier to read. You can remove it if you want since it can mess with your other styles. */
}
body::before {
content: "XS";
color: red;
font-size: 2rem;
font-weight: bold;
position: fixed;
top: 0;
right: 0;
}
/* This box class is purely used for explaining how the bootstrap grid system works. */
.box {
background-color: lightblue;
border: 1px solid blue;
min-height: 50px;
font-size: 2rem;
}
@media (min-width: 576px) {
body::before {
content: "SM";
}
}
@media (min-width: 768px) {
body::before {
content: "MD";
}
}
@media (min-width: 992px) {
body::before {
content: "LG";
}
}
@media (min-width: 1200px) {
body::before {
content: "XL";
}
}
@media (min-width: 1400px) {
body::before {
content: "XXL";
}
}
@emailjohnthomascaballero

this helps a lot bro

@RobBerger
Copy link

This is so handy, thank you for providing it!

@sahil-ansari01
Copy link

Thanks a lot buddy !

@thepritampatil
Copy link

Thank you

@BatterMongrol
Copy link

Thank you for providing this CSS file that I can use to test the Bootstrap functionality! I hope you are having a great day!

@hoangphatdev
Copy link

thank a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment