💡
@BenedekGagyi
CSS Grid
@BenedekGagyi
@BenedekGagyi
The standards process should focus on adding new low-level capabilities to the web platform
1.
The web platform should expose low-level capabilities that
explain existing features
2.
(... it) should develop, describe and test new high-level features in JavaScript, and allow web developers to iterate on them before they become standardized
3.
1.
3.
2.
HTML
JS
CSS
?
?
?
?
@BenedekGagyi
? /
CSS-in-jS
PostCSS
SASS
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
✋
@BenedekGagyi
@BenedekGagyi
Lea Verou
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
:root {
--box-size: 50px;
}
.box {
width: var(--box-size);
height: var(--box-size);
}
@BenedekGagyi
element.style.setProperty("--box-size", 100);
("--box-size", 100)
("--box-size", 100 + 'px')
@BenedekGagyi
CSS.registerProperty({
name: '--box-size',
syntax: '<length>',
initialValue: '50px',
inherits: true,
});
@BenedekGagyi
element.attributeStyleMap.get('width')
{
value: 50,
unit: "percent"
}
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
@BenedekGagyi
(CSS.paintWorklet || paintWorklet).addModule('paintworklet.js');
registerPaint('fancy', class {
paint(ctx, geom, props) {
...
}
});
background-image: paint(radio-button);
background-image: paint-radio-button();
@BenedekGagyi