Bootstrap: Responsive Spacing

Created on 5 Aug 2018  路  2Comments  路  Source: twbs/bootstrap

Being a mobile first framework, I feel that users would get a lot of utility from having spacing functions that are responsive. For example, margin can become 0 whenever the screen falls below a certain width. Otherwise, certain components look awkward without being responsive.

Most helpful comment

As I understand it, this already exists: https://getbootstrap.com/docs/4.1/utilities/spacing/#notation

The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.

For example: mx-0 mx-md-2 mx-lg-3.

All 2 comments

As I understand it, this already exists: https://getbootstrap.com/docs/4.1/utilities/spacing/#notation

The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.

For example: mx-0 mx-md-2 mx-lg-3.

Thank you so much for this! This somehow missed my notice. These are super helpful.

Was this page helpful?
0 / 5 - 0 ratings