Implemented classes for the spacing sizes (in pixels) in our design system.
Provided utility classes for margins
m - margin
mx - margin-left, margin-right
my - margin-top, margin-bottom
mt - margin-top
mr - margin-right
mb - margin-bottom
ml - margin-left
Provided utility classes for paddings
p - padding
px - padding-left, padding-right
py - padding-top, padding-bottom
pt - padding-top
pr - padding-right
pb - padding-bottom
pl - padding-left
Example of usage:
className="m-1-5 px-3 py-0-5"
Created mixin generate-utilities that generates utility classes based on a provided configuration map. Our utility classes can be easily scaled with this mixin
Additional
Reorganized creation of CSS variables by replacing generate-css-variables($map, $prefix) with register-vars($vars, $name)
Created get-var($name, $suffix) function that retrieves the value of a CSS variable by constructing its name using a base name and optional suffix.
These changes will reduce the amount of boilerplate code when working with CSS variables.
Added spacing utility classes
m
- marginmx
- margin-left, margin-rightmy
- margin-top, margin-bottommt
- margin-topmr
- margin-rightmb
- margin-bottomml
- margin-leftp
- paddingpx
- padding-left, padding-rightpy
- padding-top, padding-bottompt
- padding-toppr
- padding-rightpb
- padding-bottompl
- padding-leftExample of usage:
generate-utilities
that generates utility classes based on a provided configuration map. Our utility classes can be easily scaled with this mixinAdditional
generate-css-variables($map, $prefix)
withregister-vars($vars, $name)
get-var($name, $suffix)
function that retrieves the value of a CSS variable by constructing its name using a base name and optional suffix.These changes will reduce the amount of boilerplate code when working with CSS variables.