CSS remains easy to author:
simple declarative syntax
CSS can evolve more quickly with Houdini.
Favor flexible, low-level APIs
Avoid opinionated, high-level features
Ship quickly and encourage developer feedback
All major vendors are involved. Very rare.
It's a universal problem worth solving.
@extends
or @media (offline: true)
// Without variable types
el.style.left = 5 + 'px';
// With variable types
el.style.left = new CSSUnitValue(5, 'px'));
Adds typed variables to CSSOM
Allows more values to be animated/transitioned.
CSS.registerProperty({
name: '--circle-radius',
syntax: '<number>',
initialValue: '0',
inherits: true, // defaults to false
});
Supercharges CSS Custom Properties
Define typed, animatable, transitionable props
"mini" Web Workers
Web Workers | Worklets | |
---|---|---|
Off-thread | ✅ | ✅ |
DOM access | ❌ | ❌ |
Event Listeners | ✅ | ❌ |
Parallelism | ❌ | ✅ |
Execute quickly | ❌ | ✅ |
.gallery {
display: layout('masonry');
}
<script>
CSS.layoutWorklet.addModule('./masonry.js');
</script>
Custom layouts with simple CSS declaration!
.face {
background-image: paint('face');
--face-mood: sad;
}
.face--houdini {
--face-mood: happy;
}
<script>
CSS.paintWorklet.addModule('./face.js');
</script>
Declare complex, interactive elements in CSS
Animation Worklets (only non-layout CSS props)
Interactions on-par with native apps!!!
CSS Snap, position: sticky
,
Animations using gesture as timing function.
Say hi: