To use these classes, simply append them to any HTML element:
<!-- Adds 1rem of margin at the bottom --><pclass="mb-4">Margin bottom</p><!-- Adds 0.25rem of padding on the left and the right --><pclass="px-1">Horizontal padding</p><!-- Removes the margin on the right and adds 0.75rem padding at the top --><pclass="mr-0 pt-3">Both</p>
Because every developer has their own preferences, and to satisfy Bulma's
customization features, it's possible to specify your own
class name shortcuts as well as the
spacing values.
For example, if you wanted:
margin to be abbreviated to mg
padding to be totally
excluded
horizontal to be abbreviated to h
vertical to be excluded as well
and to only have 3 values: "small" at 10px,
"medium" at 30px, and
"large" at 60px
You can simplify the CSS output by customizing these
SCSS variables: