Spacing
Kyber's spacing utilities are based on relative pixel values from 16px. These are exposed as CSS custom properities and used to generate the utility classes. These numeric value in the variable name corresponds to the utility class margin and padding numeric values. The following table shows the custom properties and their corresponding values.
Variable | Value |
---|---|
--bs-spacer | 0 |
--bs-spacer-1 | 0.25rem |
--bs-spacer-2 | 0.5rem |
--bs-spacer-3 | 1rem |
--bs-spacer-4 | 1.5rem |
--bs-spacer-5 | 3rem |
Margin and padding
The classes are named using the format {property}{sides}-{size}
for xs and {property}{sides}-{breakpoint}-{size}
for sm, md, lg, xl, and xxl.
Where property is one of:
m
- for classes that set margin
p
- for classes that set padding
Where sides is one of:
t
- for classes that set margin-top or padding-top
b
- for classes that set margin-bottom or padding-bottom
s
- (start) for classes that set margin-left or padding-left in LTR, margin-right or padding-right in RTL
e
- (end) for classes that set margin-right or padding-right in LTR, margin-left or padding-left in RTL
x
- for classes that set both -left and -right
y
- for classes that set both -top and -bottom
blank - for classes that set a margin or padding on all 4 sides of the element