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?
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With