Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap margin class for extra small screens

I use such Bootstrap classes for margin like: my-sm-3, m-0, mr-2 etc. But I didn't find margin class only for mobile screens. my-xs-3 doesn't work. Do they have a class for such a case?

like image 382
Nikolay Avatar asked Dec 18 '22 00:12

Nikolay


1 Answers

There's no xs in Bootstrap 4. So, what you are looking for is just my-3.

This is because Bootstrap 4 is "mobile first".

And the same thinking is applied to other classes like column classes as well.

So, instead of col-xs-*, in Bootstrap 4 there is just col-*.

"Mobile first" means the default value is defined for the smallest possible screen (mobile) and then values can be modified for screens that get progressively larger. This is also known as "progressive enhancement".

like image 107
WebDevBooster Avatar answered Dec 20 '22 14:12

WebDevBooster