Which is the same as:
p {
continue: discard;
max-lines: 2;
block-elipsis: "…";
}
Beyond line-clamp
article { continue: fragments; }
article:nth-fragment(1) {
max-lines: 3;
font-size: 1.5em;
}
article:nth-fragment(2) {
columns: 3;
}
Houdini example—Part 1
CSS.registerProperty({
name: '--circle-color',
syntax: '<color>',
initialValue: 'black',
inherits: false
});
or
@property --circle-color {
syntax: "<color>";
initial-value: black;
inherits: false;
}
Houdini example—Part 2
CSS.paintWorklet.addModule('circle.js');
registerPaint('circle', class {
static get inputProperties() {return ['--circle-color'];}
paint(ctx, geom, properties) {
const color = properties.get('--circle-color');
const x = geom.width / 2;
const y = geom.height / 2;
const radius = Math.min(x, y);
ctx.fillStyle = color.toString();
ctx.beginPath();
ctx.arc(x, y, radius, 0, 2 * Math.PI, false);
ctx.fill();
}
});
Houdini example—Part 3
.circled {
--circle-color: pink;
background: paint(circle);
}
.circled {
animation: colors linear infinite 5s;
}
@keyframes colors {
0% { --circle-color: green; }
40% { --circle-color: purple; }
60% { --circle-color: orange; }
100% { --circle-color: green; }
}