@supports
will-change
@property
image-set()
image()
:root { --main-bg-color: brown; } .foo { background-color: var(--main-bg-color); }
@supports (display: table-cell) and (display: list-item) { //... }
min(), max(), clamp()
min()
max()
clamp()
.element { width: clamp(100px, 50vw, 600px); }
@property --property-name { syntax: "<color>"; inherits: false; initial-value: #c0ffee; }
@layer layer-name {rules}
::part(), :host(), ::slotted()
::part()
:host()
::slotted()
custom-element::part(foo) { /* Styles to apply to the `foo` part */ } :host(.special-custom-element) { font-weight: bold; } ::slotted(*) { font-weight: bold; }
sin(), cos(), tan()…
sin()
cos()
tan()
div { width: calc(100px * cos(45deg)); height: calc(100px * cos(45deg)); }
.parent { color: blue; .child { color: red; } }
.box { background-image: image-set( url("small-balloons.jpg") 1x, url("large-balloons.jpg") 2x); }
.foo { background-image: image("myimage.webp#xywh=0,20,40,60"); }