Releases: master-co/css
Releases Β· master-co/css
v2.0.0-beta.215
v2.0.0-beta.214
Improvements
- Refactor default media queries to use screen sizes tokens dd9dbbb @1aron
- Remove unused variables
size
and simplify code 5619e66 @1aron - Rename variables
box-size
toscreen
a798d99 @1aronApply the screen variables:export default { variables: { screen: { '4xs': 360, '3xs': 480, '2xs': 600, 'xs': 768, 'sm': 834, 'md': 1024, 'lg': 1280, 'xl': 1440, '2xl': 1600, '3xl': 1920, '4xl': 2560 } } }
- max-w:md + max-w:screen-md
- Use
size:W|H
,max:W|H
,min:W|H
instead ofWxH
,max:WxH
,min:WxH
da8331e @1aron- 16x16 + size:16 = size:4x
- max:16x32 + max:16|32 = max:4x|8x
The- min:16x16 + min:16 = min:4x
x
separator in16x32
collides with the latest unit multiplierx
, like16xx32x
, and it is unintuitive.
Documentation
- New documentation Screen Sizes ddc8631 @1aron
- Add code to cancel maximum width for media #318 d3835a5 @1aron
- Update Box Decoration Break demos f1a9d2f @1aron
Tests
v2.0.0-beta.213
v2.0.0-beta.212
v2.0.0-beta.211
v2.0.0-beta.210
v2.0.0-beta.209
v2.0.0-beta.208
New Features
-
Multiplier unit
x
andconfig.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 - } - } }
v2.0.0-beta.207
v2.0.0-beta.206
Performance Upgrades
Deprecations
- Nested variable definitions to align rules 1ad1e7a @1aron
import { variables } from '@master/css' /** @type {import('@master/css').Config} */ export default { variables: { - font: { - family: { - sans: ['Inter', ...variables.font.family.sans] - } - } + 'font-family': { + sans: ['Inter', ...variables['font-family'].sans] + } } }