v2.0.0-beta.208
Pre-release
Pre-release
·
102 commits
to beta
since this release
New Features
-
Multiplier unit
xandconfig.baseUnit#316 51bf4a2 @BenSeageFor example, with the default
baseUnit: 4, the spacing scale1x, 2x, …will be4, 8, ….<div class="m:4x"></div>
Generated CSS:
.m\:4x { margin: 1rem; }
How is 1rem calculated?
4x = 4(multiplier)*4(base unit) = 16px, 16px / 16(root size) = 1rem
So you don't need to define the spacing scale one by one:
export default { - variables: { - spacing: { - '1x': 4, - '2x': 8, - '3x': 12, - ..., - '40x': 160 - } - } }