Quick reference

CSS reference

Selectors, layout, type, colour and motion with examples that run in the page.

CSS turns structure into an interface. Start from normal flow, prefer layout primitives such as flexbox and grid over positioning, and name variables by their role rather than their value. Every example below targets a .demo element so you can run it immediately.

Read the full explanationCSS Essentials

Work through the guided lesson, then test yourself with a challenge.

Open course
685 entries

At-rules

At-rules, values and responsive design

@container

@container (min-width: 20rem) { … }

Styles children based on the size of their container rather than the viewport.

Open entry

@font-face

@font-face { … }

Declares a custom font and its source files, weight range and display behaviour.

Open entry

@import

@import url("theme.css");

Loads another stylesheet. It must come before every other rule except @charset and @layer.

Open entry

@layer

@layer base, components, utilities;

Orders cascade layers. Later layers win regardless of selector specificity.

Open entry

@media query

@media (min-width: 40rem) { … }

Applies rules when a media condition matches: width, pointer type, colour scheme or reduced motion.

Open entry

@supports

@supports (display: grid) { … }

Applies rules only when the browser supports a declaration.

Open entry

calc()

calc(100% - 2rem)

Performs maths across units. Operators need spaces around them.

Open entry

clamp()

clamp(1rem, 2.5vw, 2rem)

Clamps a value between a minimum and a maximum. Perfect for fluid type and spacing.

Open entry

Color functions

rgb() / hsl() / oklch()

Create colours with channels, alpha or perceptual lightness. oklch() makes consistent palettes easier.

Open entry

container-type

container-type: inline-size

Establishes a query container so descendants can respond with @container.

Open entry

Custom property

--brand: #2f74c0

Defines a reusable value. Custom properties inherit and can be changed at runtime.

Open entry

Logical properties

margin-inline, padding-block

Properties that follow writing direction instead of physical left and right.

Open entry

min() / max()

min(80vw, 40rem)

Returns the smaller or larger of the supplied values, useful for responsive caps.

Open entry

var()

var(--brand, #2f74c0)

Reads a custom property with an optional fallback.

Open entry

Colour and backgrounds

Functions and values

attr()

attr(name)

Reads an attribute value. Content support is broad; use with a fallback when needed.

Open entry

blur()

blur(radius)

Applies a Gaussian blur as a filter.

Open entry

brightness() / contrast()

brightness(amount)

Adjusts the brightness or contrast of an element.

Open entry

circle() / ellipse()

circle(radius at position)

Defines a circular or elliptical shape for clip-path and shape-outside.

Open entry

color-mix()

color-mix(in srgb, a 40%, b)

Mixes two colours in a chosen colour space.

Open entry

color() function

color(display-p3 1 0 0)

Selects a colour in a specific colour space such as display-p3.

Open entry

conic-gradient()

conic-gradient(from angle, stops)

A gradient that sweeps around a centre, ideal for charts and pie shapes.

Open entry

counter() / counters()

counter(name, style)

Reads a CSS counter for generated numbering.

Open entry

cubic-bezier()

cubic-bezier(x1, y1, x2, y2)

Defines a custom timing curve for transitions and animations.

Open entry

drop-shadow()

drop-shadow(x y blur color)

Adds a shadow that follows the shape of the element, including transparency.

Open entry

env()

env(safe-area-inset-top)

Reads device environment values such as safe-area insets.

Open entry

fit-content()

fit-content(limit)

A track that sizes to its content up to a limit.

Open entry

grayscale() / sepia()

grayscale(1)

Removes colour or applies a warm sepia tone.

Open entry

hex colour

#2f74c0

Six-digit hex for opaque colours, or eight digits for alpha.

Open entry

hsl()

hsl(210 60% 50%)

Colours by hue, saturation and lightness, which is easier to tweak by hand.

Open entry

hue-rotate()

hue-rotate(angle)

Shifts hues, handy for recolouring simple graphics.

Open entry

hwb()

hwb(210 20% 10%)

Colours by hue, whiteness and blackness.

Open entry

inset() function

inset(top right bottom left round radius)

Defines a rectangular inset shape for clipping.

Open entry

invert()

invert(1)

Inverts colours. Useful for dark-mode image treatment.

Open entry

lab() / lch()

lch(60% 50 250)

Perceptually uniform colour spaces based on CIELAB.

Open entry

light-dark()

light-dark(light, dark)

Chooses a colour based on the user’s colour scheme.

Open entry

linear-gradient()

linear-gradient(direction, stops)

A gradient along a straight line. Supports hard stops and colour hints.

Open entry

matrix() / matrix3d()

matrix(a, b, c, d, e, f)

The compact mathematical form of a transform.

Open entry

minmax()

minmax(min, max)

Defines a grid track that can grow between a minimum and a maximum.

Open entry

oklab() / oklch()

oklch(0.62 0.16 250)

Perceptually uniform colour spaces designed for modern displays and palettes.

Open entry

path()

path("M … Z")

Uses SVG path data as a clipping or motion shape.

Open entry

perspective() function

perspective(distance)

Adds depth to a 3D transform applied to the same element.

Open entry

polygon()

polygon(x y, x y, …)

Defines an arbitrary polygon for clip-path.

Open entry

radial-gradient()

radial-gradient(shape, stops)

A gradient that radiates from a centre point.

Open entry

repeat()

repeat(count, tracks)

Repeats a grid track list, optionally auto-fitting to the container.

Open entry

repeating-linear-gradient()

repeating-linear-gradient(...)

Repeats a linear gradient, great for stripes and patterns.

Open entry

rgb() / rgba()

rgb(47 116 192 / 0.8)

Colours with red, green, blue channels and optional alpha.

Open entry

rotate() function

rotate(angle)

Rotates an element around its transform origin.

Open entry

saturate()

saturate(amount)

Changes colour saturation.

Open entry

scale() function

scale(x, y)

Scales an element around its transform origin.

Open entry

steps()

steps(count, jump-term)

A stepped timing function, perfect for sprite frames and mechanical motion.

Open entry

translate() function

translate(x, y)

Moves an element without affecting layout. Part of the transform functions.

Open entry

transparent

transparent

A fully transparent colour, equivalent to rgb(0 0 0 / 0).

Open entry

url()

url(path)

References an external resource such as an image or font.

Open entry

Interaction and accessibility

Layout

align-content

align-content: flex-start

Aligns wrapped lines on the cross axis when there is extra space.

Open entry

align-items

align-items: center

Aligns items on the cross axis of a flex container.

Open entry

align-self

align-self: flex-end

Overrides align-items for a single flex item.

Open entry

clear

clear: both

Prevents an element from sitting beside a floated element.

Open entry

display

display: block | flex | grid | none

Selects the layout model for an element and its children. display:none removes it from layout and accessibility.

Open entry

flex

display: flex

Lays children out in one dimension and distributes free space along the main axis.

Open entry

flex-basis

flex-basis: 12rem

The starting size of a flex item before growth or shrinking.

Open entry

flex-direction

flex-direction: row | column

Sets the main axis: row, row-reverse, column or column-reverse.

Open entry

flex-grow

flex-grow: 1

How much a flex item grows when there is free space.

Open entry

flex-shrink

flex-shrink: 0

Whether a flex item may shrink when space is tight. Prevent shrinking on icons and buttons.

Open entry

flex-wrap

flex-wrap: wrap

Allows items to move onto new lines instead of shrinking forever.

Open entry

float

float: left

Pushes an element to one side and lets text wrap. Modern layout should use flexbox or grid.

Open entry

gap

gap: 16px

Space between grid or flex items. Removes the need for margin hacks.

Open entry

grid

display: grid

Two-dimensional layout with explicit rows and columns.

Open entry

grid-column

grid-column: 1 / -1

Places an item across columns. Negative line numbers count from the end.

Open entry

grid-row

grid-row: span 2

Places an item across rows.

Open entry

grid-template-areas

grid-template-areas: "a b"

Names grid regions so children can be placed by area.

Open entry

grid-template-columns

grid-template-columns: repeat(3, 1fr)

Defines the column track list. repeat(auto-fit, minmax(12rem, 1fr)) is a responsive default.

Open entry

grid-template-rows

grid-template-rows: auto 1fr

Defines the row track list.

Open entry

Inset

inset: 0

Shorthand for top, right, bottom and left. inset:0 stretches an absolutely positioned element.

Open entry

justify-content

justify-content: space-between

Distributes items along the main axis.

Open entry

order

order: -1

Changes visual order without changing DOM order. Do not reorder focusable content unpredictably.

Open entry

place-content

place-content: center

Shorthand for align-content and justify-content.

Open entry

place-items

place-items: center

Shorthand for align-items and justify-items in grid or flex.

Open entry

position

position: relative | absolute | fixed | sticky

Removes an element from normal flow in all modes except relative and sticky.

Open entry

z-index

z-index: 10

Orders positioned or flex/grid items on the stacking axis. It only works where stacking applies.

Open entry

More selectors

::backdrop

::backdrop

Styles the backdrop behind a modal dialog or a fullscreen element.

Open entry

::file-selector-button

::file-selector-button

Styles the button inside a file input.

Open entry

::first-letter

::first-letter

Styles the first letter for drop caps and editorial treatment.

Open entry

::first-line

::first-line

Styles the first line of a block. The exact text can change with the viewport.

Open entry

::marker

::marker

Styles list markers and summary markers.

Open entry

::part()

::part(name)

Styles a named part exposed by a web component.

Open entry

::slotted()

::slotted(selector)

Styles light-DOM content projected into a slot from inside a shadow tree.

Open entry

::target-text

::target-text

Styles the text highlighted by a URL text fragment.

Open entry

:autofill

:autofill

Matches fields the browser has autofilled. Style it carefully because browser defaults are strong.

Open entry

:default

:default

Matches the default option or the default submit button of a form.

Open entry

:dir()

:dir(rtl)

Matches elements by text direction, including inherited direction.

Open entry

:first-of-type / :last-of-type

:first-of-type

Matches by position among siblings of the same tag.

Open entry

:in-range / :out-of-range

:in-range

Matches number and date inputs whose value is inside or outside the min and max.

Open entry

:lang()

:lang(bn)

Matches elements in a given language, including inherited language.

Open entry

:nth-last-child()

:nth-last-child(2)

Counts from the end of the sibling list.

Open entry

:nth-last-of-type()

:nth-last-of-type(1)

Counts from the end among siblings of the same tag.

Open entry

:only-child

:only-child

Matches an element that is the only child of its parent.

Open entry

:only-of-type

:only-of-type

Matches an element that is the only sibling of its type.

Open entry

:placeholder-shown

:placeholder-shown

Matches an input or textarea while its placeholder is visible, which means it is empty.

Open entry

:read-only / :read-write

:read-write

Matches elements whose content can be edited.

Open entry

:required / :optional

:required

Matches form controls based on the required attribute.

Open entry

:root

:root

Matches the document root, usually html. The standard place to declare design tokens.

Open entry

:scope

:scope

Matches the element a selector is scoped to. Useful inside components and querySelector calls.

Open entry

:target

:target

Matches the element whose id is in the URL fragment.

Open entry

:user-invalid

:user-invalid

Matches a field after the user has interacted and the value is invalid. Better than :invalid for UX.

Open entry

Attribute operators

[href^="https"]

Attribute selectors support =, ~=, |=, ^=, $= and *=.

Open entry

Selector list

h1, h2, h3

Applies one rule to several selectors. A single invalid selector invalidates the whole list unless :is() is used.

Open entry

Motion and transforms

@keyframes

@keyframes name { … }

Defines the intermediate steps of an animation.

Open entry

animation

animation: name 1s ease infinite

Shorthand for animating keyframes: name, duration, timing, delay, iteration and direction.

Open entry

animation-duration

animation-duration: 300ms

How long one animation cycle lasts.

Open entry

animation-iteration-count

animation-iteration-count: infinite

How many times the animation repeats. Prefer short, finite animations for attention.

Open entry

animation-name

animation-name: pulse

Selects which keyframes block to run.

Open entry

perspective

perspective: 600px

Adds depth to 3D transforms applied to children.

Open entry

prefers-reduced-motion

@media (prefers-reduced-motion: reduce)

Respects users who ask the operating system to reduce motion. Disable non-essential animation here.

Open entry

transform

transform: translateY(-4px) scale(1.02)

Moves, rotates, scales or skews an element without affecting layout. Multiple functions apply in order.

Open entry

transform-origin

transform-origin: top left

Sets the anchor point for transforms.

Open entry

transition

transition: 160ms ease

Animates changes to animatable properties when their value changes.

Open entry

transition-duration

transition-duration: 200ms

How long a transition takes. UI feedback usually lands between 120ms and 260ms.

Open entry

transition-property

transition-property: opacity, transform

Chooses which properties animate. Avoid transition: all because it animates unintended changes.

Open entry

transition-timing-function

transition-timing-function: ease-out

The acceleration curve. ease-out feels responsive for entrances and hover states.

Open entry

will-change

will-change: transform

Hints that a property will animate so the browser can optimise ahead. Use temporarily, never as a blanket rule.

Open entry

Properties — Compositing and Blending

Properties — CSS Anchor Positioning

anchor-name

anchor-name: none | <dashed-ident>#

The CSS anchor-name property. Initial value: none. Not inherited.

Open entry

anchor-scope

anchor-scope: none | all | <dashed-ident>#

The CSS anchor-scope property. Initial value: none. Not inherited.

Open entry

bottom

bottom: auto | <length-percentage> | <anchor()> | <anchor-size()>

The CSS bottom property. Initial value: auto. Not inherited.

Open entry

left

left: auto | <length-percentage> | <anchor()> | <anchor-size()>

The CSS left property. Initial value: auto. Not inherited.

Open entry

margin-bottom

margin-bottom: <length-percentage> | auto | <anchor-size()>

The CSS margin-bottom property. Initial value: 0. Not inherited.

Open entry

margin-left

margin-left: <length-percentage> | auto | <anchor-size()>

The CSS margin-left property. Initial value: 0. Not inherited.

Open entry

margin-right

margin-right: <length-percentage> | auto | <anchor-size()>

The CSS margin-right property. Initial value: 0. Not inherited.

Open entry

margin-top

margin-top: <length-percentage> | auto | <anchor-size()>

The CSS margin-top property. Initial value: 0. Not inherited.

Open entry

position-anchor

position-anchor: normal | auto | none | <anchor-name> | match-parent

The CSS position-anchor property. Initial value: normal. Not inherited.

Open entry

position-area

position-area: none | <position-area>

The CSS position-area property. Initial value: none. Not inherited.

Open entry

position-try

position-try: <'position-try-order'>? <'position-try-fallbacks'>

The CSS position-try property. Initial value: position-try-fallbacks,position-try-order. Not inherited.

Open entry

position-try-fallbacks

position-try-fallbacks: none | [ [<dashed-ident> || <try-tactic>] | <'position-area'> ]#

The CSS position-try-fallbacks property. Initial value: none. Not inherited.

Open entry

position-try-order

position-try-order: normal | <try-size>

The CSS position-try-order property. Initial value: normal. Not inherited.

Open entry

position-visibility

position-visibility: always | [ anchors-valid || anchors-visible || no-overflow ]

The CSS position-visibility property. Initial value: anchors-visible. Not inherited.

Open entry

right

right: auto | <length-percentage> | <anchor()> | <anchor-size()>

The CSS right property. Initial value: auto. Not inherited.

Open entry

top

top: auto | <length-percentage> | <anchor()> | <anchor-size()>

The CSS top property. Initial value: auto. Not inherited.

Open entry

Properties — CSS Animations

animation-composition

animation-composition: <single-animation-composition>#

The CSS animation-composition property. Initial value: replace. Not inherited.

Open entry

animation-delay

animation-delay: <time>#

The CSS animation-delay property. Initial value: 0s. Not inherited.

Open entry

animation-direction

animation-direction: <single-animation-direction>#

The CSS animation-direction property. Initial value: normal. Not inherited.

Open entry

animation-fill-mode

animation-fill-mode: <single-animation-fill-mode>#

The CSS animation-fill-mode property. Initial value: none. Not inherited.

Open entry

animation-play-state

animation-play-state: <single-animation-play-state>#

The CSS animation-play-state property. Initial value: running. Not inherited.

Open entry

animation-timeline

animation-timeline: <single-animation-timeline>#

The CSS animation-timeline property. Initial value: auto. Not inherited.

Open entry

animation-timing-function

animation-timing-function: <easing-function>#

The CSS animation-timing-function property. Initial value: ease. Not inherited.

Open entry

animation-trigger

animation-trigger: [ none | [ <dashed-ident> <animation-action>+ ]+ ]#

The CSS animation-trigger property. Initial value: none. Not inherited.

Open entry

timeline-trigger

timeline-trigger: none | [ <'timeline-trigger-name'> <'timeline-trigger-source'> <'timeline-trigger-activation-range'> [ '/' <'timeline-trigger-active-range'> ]? ]#

The CSS timeline-trigger property. Initial value: timeline-trigger-name,timeline-trigger-source,timeline-trigger-activation-range,timeline-trigger-active-range. Not inherited.

Open entry

timeline-trigger-activation-range

timeline-trigger-activation-range: [ <'timeline-trigger-activation-range-start'> <'timeline-trigger-activation-range-end'>? ]#

The CSS timeline-trigger-activation-range property. Initial value: timeline-trigger-activation-range-start,timeline-trigger-activation-range-end. Not inherited.

Open entry

timeline-trigger-activation-range-end

timeline-trigger-activation-range-end: [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS timeline-trigger-activation-range-end property. Initial value: normal. Not inherited.

Open entry

timeline-trigger-activation-range-start

timeline-trigger-activation-range-start: [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS timeline-trigger-activation-range-start property. Initial value: normal. Not inherited.

Open entry

timeline-trigger-active-range

timeline-trigger-active-range: [ <'timeline-trigger-active-range-start'> <'timeline-trigger-active-range-end'>? ]#

The CSS timeline-trigger-active-range property. Initial value: timeline-trigger-active-range-start,timeline-trigger-active-range-end. Not inherited.

Open entry

timeline-trigger-active-range-end

timeline-trigger-active-range-end: [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS timeline-trigger-active-range-end property. Initial value: auto. Not inherited.

Open entry

timeline-trigger-active-range-start

timeline-trigger-active-range-start: [ auto | normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS timeline-trigger-active-range-start property. Initial value: auto. Not inherited.

Open entry

timeline-trigger-name

timeline-trigger-name: none | <dashed-ident>#

The CSS timeline-trigger-name property. Initial value: none. Not inherited.

Open entry

timeline-trigger-source

timeline-trigger-source: <single-animation-timeline>#

The CSS timeline-trigger-source property. Initial value: auto. Not inherited.

Open entry

trigger-scope

trigger-scope: none | all | <dashed-ident>#

The CSS trigger-scope property. Initial value: none. Not inherited.

Open entry

Properties — CSS Backgrounds and Borders

background

background: <bg-layer>#? , <final-bg-layer>

The CSS background property. Initial value: background-image,background-position,background-size,background-repeat,background-origin,background-clip,background-attachment,background-color. Not inherited.

Open entry

background-attachment

background-attachment: <attachment>#

The CSS background-attachment property. Initial value: scroll. Not inherited.

Open entry

background-origin

background-origin: <visual-box>#

The CSS background-origin property. Initial value: padding-box. Not inherited.

Open entry

background-position-x

background-position-x: [ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#

The CSS background-position-x property. Initial value: 0%. Not inherited.

Open entry

background-position-y

background-position-y: [ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#

The CSS background-position-y property. Initial value: 0%. Not inherited.

Open entry

border-bottom

border-bottom: <line-width> || <line-style> || <color>

The CSS border-bottom property. Initial value: border-bottom-width,border-bottom-style,border-bottom-color. Not inherited.

Open entry

border-bottom-color

border-bottom-color: <'border-top-color'>

The CSS border-bottom-color property. Initial value: currentcolor. Not inherited.

Open entry

border-bottom-left-radius

border-bottom-left-radius: <length-percentage [0,∞]>{1,2}

The CSS border-bottom-left-radius property. Initial value: 0. Not inherited.

Open entry

border-bottom-right-radius

border-bottom-right-radius: <length-percentage [0,∞]>{1,2}

The CSS border-bottom-right-radius property. Initial value: 0. Not inherited.

Open entry

border-bottom-style

border-bottom-style: <line-style>

The CSS border-bottom-style property. Initial value: none. Not inherited.

Open entry

border-bottom-width

border-bottom-width: <line-width>

The CSS border-bottom-width property. Initial value: medium. Not inherited.

Open entry

border-color

border-color: <color>{1,4}

The CSS border-color property. Initial value: border-top-color,border-right-color,border-bottom-color,border-left-color. Not inherited.

Open entry

border-image

border-image: <'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>

The CSS border-image property. Initial value: border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat. Not inherited.

Open entry

border-image-outset

border-image-outset: [ <length [0,∞]> | <number [0,∞]> ]{1,4}

The CSS border-image-outset property. Initial value: 0. Not inherited.

Open entry

border-image-repeat

border-image-repeat: [ stretch | repeat | round | space ]{1,2}

The CSS border-image-repeat property. Initial value: stretch. Not inherited.

Open entry

border-image-slice

border-image-slice: [ <number [0,∞]> | <percentage [0,∞]> ]{1,4} && fill?

The CSS border-image-slice property. Initial value: 100%. Not inherited.

Open entry

border-image-source

border-image-source: none | <image>

The CSS border-image-source property. Initial value: none. Not inherited.

Open entry

border-image-width

border-image-width: [ <length-percentage [0,∞]> | <number [0,∞]> | auto ]{1,4}

The CSS border-image-width property. Initial value: 1. Not inherited.

Open entry

border-left

border-left: <line-width> || <line-style> || <color>

The CSS border-left property. Initial value: border-left-width,border-left-style,border-left-color. Not inherited.

Open entry

border-left-color

border-left-color: <color>

The CSS border-left-color property. Initial value: currentcolor. Not inherited.

Open entry

border-left-style

border-left-style: <line-style>

The CSS border-left-style property. Initial value: none. Not inherited.

Open entry

border-left-width

border-left-width: <line-width>

The CSS border-left-width property. Initial value: medium. Not inherited.

Open entry

border-right

border-right: <line-width> || <line-style> || <color>

The CSS border-right property. Initial value: border-right-width,border-right-style,border-right-color. Not inherited.

Open entry

border-right-color

border-right-color: <color>

The CSS border-right-color property. Initial value: currentcolor. Not inherited.

Open entry

border-right-style

border-right-style: <line-style>

The CSS border-right-style property. Initial value: none. Not inherited.

Open entry

border-right-width

border-right-width: <line-width>

The CSS border-right-width property. Initial value: medium. Not inherited.

Open entry

border-shape

border-shape: none | [ <basic-shape> <geometry-box>?]{1,2}

The CSS border-shape property. Initial value: none. Not inherited.

Open entry

border-style

border-style: <line-style>{1,4}

The CSS border-style property. Initial value: border-top-style,border-right-style,border-bottom-style,border-left-style. Not inherited.

Open entry

border-top

border-top: <line-width> || <line-style> || <color>

The CSS border-top property. Initial value: border-top-width,border-top-style,border-top-color. Not inherited.

Open entry

border-top-color

border-top-color: <color>

The CSS border-top-color property. Initial value: currentcolor. Not inherited.

Open entry

border-top-left-radius

border-top-left-radius: <length-percentage [0,∞]>{1,2}

The CSS border-top-left-radius property. Initial value: 0. Not inherited.

Open entry

border-top-right-radius

border-top-right-radius: <length-percentage [0,∞]>{1,2}

The CSS border-top-right-radius property. Initial value: 0. Not inherited.

Open entry

border-top-style

border-top-style: <line-style>

The CSS border-top-style property. Initial value: none. Not inherited.

Open entry

border-top-width

border-top-width: <line-width>

The CSS border-top-width property. Initial value: medium. Not inherited.

Open entry

border-width

border-width: <line-width>{1,4}

The CSS border-width property. Initial value: border-top-width,border-right-width,border-bottom-width,border-left-width. Not inherited.

Open entry

corner-block-end-shape

corner-block-end-shape: <corner-shape-value>{1,2}

The CSS corner-block-end-shape property. Initial value: corner-end-start-shape,corner-end-end-shape. Not inherited.

Open entry

corner-block-start-shape

corner-block-start-shape: <corner-shape-value>{1,2}

The CSS corner-block-start-shape property. Initial value: corner-start-start-shape,corner-start-end-shape. Not inherited.

Open entry

corner-bottom-left-shape

corner-bottom-left-shape: <corner-shape-value>

The CSS corner-bottom-left-shape property. Initial value: round. Not inherited.

Open entry

corner-bottom-right-shape

corner-bottom-right-shape: <corner-shape-value>

The CSS corner-bottom-right-shape property. Initial value: round. Not inherited.

Open entry

corner-bottom-shape

corner-bottom-shape: <corner-shape-value>{1,2}

The CSS corner-bottom-shape property. Initial value: corner-bottom-left-shape,corner-bottom-right-shape. Not inherited.

Open entry

corner-end-end-shape

corner-end-end-shape: <corner-shape-value>

The CSS corner-end-end-shape property. Initial value: round. Not inherited.

Open entry

corner-end-start-shape

corner-end-start-shape: <corner-shape-value>

The CSS corner-end-start-shape property. Initial value: round. Not inherited.

Open entry

corner-inline-end-shape

corner-inline-end-shape: <corner-shape-value>{1,2}

The CSS corner-inline-end-shape property. Initial value: corner-start-end-shape,corner-end-end-shape. Not inherited.

Open entry

corner-inline-start-shape

corner-inline-start-shape: <corner-shape-value>{1,2}

The CSS corner-inline-start-shape property. Initial value: corner-start-start-shape,corner-start-end-shape. Not inherited.

Open entry

corner-left-shape

corner-left-shape: <corner-shape-value>{1,2}

The CSS corner-left-shape property. Initial value: corner-top-left-shape,corner-bottom-left-shape. Not inherited.

Open entry

corner-right-shape

corner-right-shape: <corner-shape-value>{1,2}

The CSS corner-right-shape property. Initial value: corner-top-right-shape,corner-bottom-right-shape. Not inherited.

Open entry

corner-shape

corner-shape: <corner-shape-value>{1,4}

The CSS corner-shape property. Initial value: corner-top-left-shape,corner-top-right-shape,corner-bottom-left-shape,corner-bottom-right-shape. Not inherited.

Open entry

corner-start-end-shape

corner-start-end-shape: <corner-shape-value>

The CSS corner-start-end-shape property. Initial value: round. Not inherited.

Open entry

corner-start-start-shape

corner-start-start-shape: <corner-shape-value>

The CSS corner-start-start-shape property. Initial value: round. Not inherited.

Open entry

corner-top-left-shape

corner-top-left-shape: <corner-shape-value>

The CSS corner-top-left-shape property. Initial value: round. Not inherited.

Open entry

corner-top-right-shape

corner-top-right-shape: <corner-shape-value>

The CSS corner-top-right-shape property. Initial value: round. Not inherited.

Open entry

corner-top-shape

corner-top-shape: <corner-shape-value>{1,2}

The CSS corner-top-shape property. Initial value: corner-top-left-shape,corner-top-right-shape. Not inherited.

Open entry

Properties — CSS Basic User Interface

appearance

appearance: none | auto | <compat-auto> | <compat-special>

The CSS appearance property. Initial value: none. Not inherited.

Open entry

caret

caret: <'caret-color'> || <'caret-animation'> || <'caret-shape'>

The CSS caret property. Initial value: caret-color,caret-animation,caret-shape. Inherited.

Open entry

caret-animation

caret-animation: auto | manual

The CSS caret-animation property. Initial value: auto. Inherited.

Open entry

caret-color

caret-color: auto | <color>

The CSS caret-color property. Initial value: auto. Inherited.

Open entry

caret-shape

caret-shape: auto | bar | block | underscore

The CSS caret-shape property. Initial value: auto. Inherited.

Open entry

field-sizing

field-sizing: content | fixed

The CSS field-sizing property. Initial value: fixed. Not inherited.

Open entry

interactivity

interactivity: auto | inert

The CSS interactivity property. Initial value: auto. Inherited.

Open entry

interest-delay

interest-delay: <'interest-delay-start'>{1,2}

The CSS interest-delay property. Initial value: interest-delay-start,interest-delay-end. Inherited.

Open entry

interest-delay-end

interest-delay-end: normal | <time>

The CSS interest-delay-end property. Initial value: normal. Inherited.

Open entry

interest-delay-start

interest-delay-start: normal | <time>

The CSS interest-delay-start property. Initial value: normal. Inherited.

Open entry

outline-color

outline-color: auto | <color>

The CSS outline-color property. Initial value: auto. Not inherited.

Open entry

outline-offset

outline-offset: <length>

The CSS outline-offset property. Initial value: 0. Not inherited.

Open entry

outline-style

outline-style: auto | <outline-line-style>

The CSS outline-style property. Initial value: none. Not inherited.

Open entry

outline-width

outline-width: <line-width>

The CSS outline-width property. Initial value: medium. Not inherited.

Open entry

resize

resize: none | both | horizontal | vertical | block | inline

The CSS resize property. Initial value: none. Not inherited.

Open entry

window-drag

window-drag: none | move

The CSS window-drag property. Initial value: none. Inherited.

Open entry

Properties — CSS Box Alignment

Properties — CSS Box Model

Properties — CSS Box Sizing

column-height

column-height: auto | <length [0,∞]>

The CSS column-height property. Initial value: auto. Not inherited.

Open entry

column-width

column-width: auto | <length [0,∞]>

The CSS column-width property. Initial value: auto. Not inherited.

Open entry

column-wrap

column-wrap: auto | nowrap | wrap

The CSS column-wrap property. Initial value: auto. Not inherited.

Open entry

contain-intrinsic-block-size

contain-intrinsic-block-size: auto? [ none | <length> ]

The CSS contain-intrinsic-block-size property. Initial value: none. Not inherited.

Open entry

contain-intrinsic-height

contain-intrinsic-height: auto? [ none | <length> ]

The CSS contain-intrinsic-height property. Initial value: none. Not inherited.

Open entry

contain-intrinsic-inline-size

contain-intrinsic-inline-size: auto? [ none | <length> ]

The CSS contain-intrinsic-inline-size property. Initial value: none. Not inherited.

Open entry

contain-intrinsic-size

contain-intrinsic-size: [ auto? [ none | <length> ] ]{1,2}

The CSS contain-intrinsic-size property. Initial value: contain-intrinsic-width,contain-intrinsic-height. Not inherited.

Open entry

contain-intrinsic-width

contain-intrinsic-width: auto? [ none | <length> ]

The CSS contain-intrinsic-width property. Initial value: none. Not inherited.

Open entry

frame-sizing

frame-sizing: auto | content-width | content-height | content-block-size | content-inline-size

The CSS frame-sizing property. Initial value: auto. Not inherited.

Open entry

max-height

max-height: none | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>

The CSS max-height property. Initial value: none. Not inherited.

Open entry

max-width

max-width: none | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>

The CSS max-width property. Initial value: none. Not inherited.

Open entry

min-height

min-height: auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>

The CSS min-height property. Initial value: auto. Not inherited.

Open entry

min-width

min-width: auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>

The CSS min-width property. Initial value: auto. Not inherited.

Open entry

Properties — CSS Cascading and Inheritance

Properties — CSS Color

Properties — CSS Conditional Rules

Properties — CSS Containment

Properties — CSS Display

Properties — CSS Flexible Box Layout

Properties — CSS Fonts

font

font: [ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name>

The CSS font property. Initial value: font-style,font-variant,font-weight,font-stretch,font-size,line-height,font-family. Inherited.

Open entry

font-feature-settings

font-feature-settings: normal | <feature-tag-value>#

The CSS font-feature-settings property. Initial value: normal. Inherited.

Open entry

font-kerning

font-kerning: auto | normal | none

The CSS font-kerning property. Initial value: auto. Inherited.

Open entry

font-language-override

font-language-override: normal | <string>

The CSS font-language-override property. Initial value: normal. Inherited.

Open entry

font-optical-sizing

font-optical-sizing: auto | none

The CSS font-optical-sizing property. Initial value: auto. Inherited.

Open entry

font-palette

font-palette: normal | light | dark | <palette-identifier> | <palette-mix()>

The CSS font-palette property. Initial value: normal. Inherited.

Open entry

font-size-adjust

font-size-adjust: none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]

The CSS font-size-adjust property. Initial value: none. Inherited.

Open entry

font-synthesis

font-synthesis: none | [ weight || style || small-caps || position]

The CSS font-synthesis property. Initial value: weight style small-caps position . Inherited.

Open entry

font-synthesis-position

font-synthesis-position: auto | none

The CSS font-synthesis-position property. Initial value: none. Inherited.

Open entry

font-synthesis-small-caps

font-synthesis-small-caps: auto | none

The CSS font-synthesis-small-caps property. Initial value: auto. Inherited.

Open entry

font-synthesis-style

font-synthesis-style: auto | none

The CSS font-synthesis-style property. Initial value: auto. Inherited.

Open entry

font-synthesis-weight

font-synthesis-weight: auto | none

The CSS font-synthesis-weight property. Initial value: auto. Inherited.

Open entry

font-variant

font-variant: normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms |

The CSS font-variant property. Initial value: normal. Inherited.

Open entry

font-variant-alternates

font-variant-alternates: normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> )

The CSS font-variant-alternates property. Initial value: normal. Inherited.

Open entry

font-variant-caps

font-variant-caps: normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps

The CSS font-variant-caps property. Initial value: normal. Inherited.

Open entry

font-variant-east-asian

font-variant-east-asian: normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]

The CSS font-variant-east-asian property. Initial value: normal. Inherited.

Open entry

font-variant-emoji

font-variant-emoji: normal | text | emoji | unicode

The CSS font-variant-emoji property. Initial value: normal. Inherited.

Open entry

font-variant-ligatures

font-variant-ligatures: normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]

The CSS font-variant-ligatures property. Initial value: normal. Inherited.

Open entry

font-variant-position

font-variant-position: normal | sub | super

The CSS font-variant-position property. Initial value: normal. Inherited.

Open entry

font-variation-settings

font-variation-settings: normal | [ <string> <number> ]#

The CSS font-variation-settings property. Initial value: normal. Inherited.

Open entry

font-width

font-width: normal | <percentage [0,∞]> | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded

The CSS font-width property. Initial value: normal. Inherited.

Open entry

Properties — CSS Fragmentation

Properties — CSS Generated Content

Properties — CSS Grid Layout

Properties — CSS Images

Properties — CSS Inline

alignment-baseline

alignment-baseline: baseline | alphabetic | ideographic | middle | central | mathematical | text-before-edge | text-after-edge

The CSS alignment-baseline property. Initial value: baseline. Not inherited.

Open entry

baseline-shift

baseline-shift: <length-percentage> | sub | super | baseline

The CSS baseline-shift property. Initial value: 0. Not inherited.

Open entry

baseline-source

baseline-source: auto | first | last

The CSS baseline-source property. Initial value: auto. Not inherited.

Open entry

dominant-baseline

dominant-baseline: auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top

The CSS dominant-baseline property. Initial value: auto. Inherited.

Open entry

initial-letter

initial-letter: normal | [ <number> <integer>? ]

The CSS initial-letter property. Initial value: normal. Not inherited.

Open entry

initial-letter-align

initial-letter-align: [ auto | alphabetic | hanging | ideographic ]

The CSS initial-letter-align property. Initial value: auto. Not inherited.

Open entry

text-box

text-box: normal | <'text-box-trim'> || <'text-box-edge'>

The CSS text-box property. Initial value: normal. Not inherited.

Open entry

text-box-edge

text-box-edge: auto | <text-edge>

The CSS text-box-edge property. Initial value: auto. Not inherited.

Open entry

text-box-trim

text-box-trim: none | trim-start | trim-end | trim-both

The CSS text-box-trim property. Initial value: none. Not inherited.

Open entry

vertical-align

vertical-align: baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>

The CSS vertical-align property. Initial value: baseline. Not inherited.

Open entry

Properties — CSS Lists and Counters

Properties — CSS Logical Properties and Values

block-size

block-size: <'width'>

The CSS block-size property. Initial value: auto. Not inherited.

Open entry

border-block

border-block: <'border-top'>

The CSS border-block property. Initial value: border-block-width,border-block-style,border-block-color. Not inherited.

Open entry

border-block-color

border-block-color: <'border-top-color'>{1,2}

The CSS border-block-color property. Initial value: border-block-start-color,border-block-end-color. Not inherited.

Open entry

border-block-end

border-block-end: <'border-top'>

The CSS border-block-end property. Initial value: border-block-end-width,border-block-end-style,border-block-end-color. Not inherited.

Open entry

border-block-end-color

border-block-end-color: <'border-top-color'>

The CSS border-block-end-color property. Initial value: currentcolor. Not inherited.

Open entry

border-block-end-style

border-block-end-style: <'border-top-style'>

The CSS border-block-end-style property. Initial value: none. Not inherited.

Open entry

border-block-end-width

border-block-end-width: <'border-top-width'>

The CSS border-block-end-width property. Initial value: medium. Not inherited.

Open entry

border-block-start

border-block-start: <'border-top'>

The CSS border-block-start property. Initial value: border-block-start-width,border-block-start-style,border-block-start-color. Not inherited.

Open entry

border-block-start-color

border-block-start-color: <'border-top-color'>

The CSS border-block-start-color property. Initial value: currentcolor. Not inherited.

Open entry

border-block-start-style

border-block-start-style: <'border-top-style'>

The CSS border-block-start-style property. Initial value: none. Not inherited.

Open entry

border-block-start-width

border-block-start-width: <'border-top-width'>

The CSS border-block-start-width property. Initial value: medium. Not inherited.

Open entry

border-block-style

border-block-style: <'border-top-style'>{1,2}

The CSS border-block-style property. Initial value: border-block-start-style,border-block-end-style. Not inherited.

Open entry

border-block-width

border-block-width: <'border-top-width'>{1,2}

The CSS border-block-width property. Initial value: border-block-start-width,border-block-end-width. Not inherited.

Open entry

border-end-end-radius

border-end-end-radius: <'border-top-left-radius'>

The CSS border-end-end-radius property. Initial value: 0. Not inherited.

Open entry

border-end-start-radius

border-end-start-radius: <'border-top-left-radius'>

The CSS border-end-start-radius property. Initial value: 0. Not inherited.

Open entry

border-inline

border-inline: <'border-top'>

The CSS border-inline property. Initial value: border-inline-width,border-inline-style,border-inline-color. Not inherited.

Open entry

border-inline-color

border-inline-color: <'border-top-color'>{1,2}

The CSS border-inline-color property. Initial value: border-inline-start-color,border-inline-end-color. Not inherited.

Open entry

border-inline-end

border-inline-end: <'border-top'>

The CSS border-inline-end property. Initial value: border-inline-end-width,border-inline-end-style,border-inline-end-color. Not inherited.

Open entry

border-inline-end-color

border-inline-end-color: <'border-top-color'>

The CSS border-inline-end-color property. Initial value: currentcolor. Not inherited.

Open entry

border-inline-end-style

border-inline-end-style: <'border-top-style'>

The CSS border-inline-end-style property. Initial value: none. Not inherited.

Open entry

border-inline-end-width

border-inline-end-width: <'border-top-width'>

The CSS border-inline-end-width property. Initial value: medium. Not inherited.

Open entry

border-inline-start

border-inline-start: <'border-top'>

The CSS border-inline-start property. Initial value: border-inline-start-width,border-inline-start-style,border-inline-start-color. Not inherited.

Open entry

border-inline-start-color

border-inline-start-color: <'border-top-color'>

The CSS border-inline-start-color property. Initial value: currentcolor. Not inherited.

Open entry

border-inline-start-style

border-inline-start-style: <'border-top-style'>

The CSS border-inline-start-style property. Initial value: none. Not inherited.

Open entry

border-inline-start-width

border-inline-start-width: <'border-top-width'>

The CSS border-inline-start-width property. Initial value: medium. Not inherited.

Open entry

border-inline-style

border-inline-style: <'border-top-style'>{1,2}

The CSS border-inline-style property. Initial value: border-inline-start-style,border-inline-end-style. Not inherited.

Open entry

border-inline-width

border-inline-width: <'border-top-width'>{1,2}

The CSS border-inline-width property. Initial value: border-inline-start-width,border-inline-end-width. Not inherited.

Open entry

border-start-end-radius

border-start-end-radius: <'border-top-left-radius'>

The CSS border-start-end-radius property. Initial value: 0. Not inherited.

Open entry

border-start-start-radius

border-start-start-radius: <'border-top-left-radius'>

The CSS border-start-start-radius property. Initial value: 0. Not inherited.

Open entry

inline-size

inline-size: <'width'>

The CSS inline-size property. Initial value: auto. Not inherited.

Open entry

inset-block

inset-block: <'top'>{1,2}

The CSS inset-block property. Initial value: inset-block-start,inset-block-end. Not inherited.

Open entry

inset-block-end

inset-block-end: <'top'>

The CSS inset-block-end property. Initial value: auto. Not inherited.

Open entry

inset-block-start

inset-block-start: <'top'>

The CSS inset-block-start property. Initial value: auto. Not inherited.

Open entry

inset-inline

inset-inline: <'top'>{1,2}

The CSS inset-inline property. Initial value: inset-inline-start,inset-inline-end. Not inherited.

Open entry

inset-inline-end

inset-inline-end: <'top'>

The CSS inset-inline-end property. Initial value: auto. Not inherited.

Open entry

inset-inline-start

inset-inline-start: <'top'>

The CSS inset-inline-start property. Initial value: auto. Not inherited.

Open entry

margin-block

margin-block: <'margin-top'>{1,2}

The CSS margin-block property. Initial value: margin-block-start,margin-block-end. Not inherited.

Open entry

margin-block-end

margin-block-end: <'margin-top'>

The CSS margin-block-end property. Initial value: 0. Not inherited.

Open entry

margin-block-start

margin-block-start: <'margin-top'>

The CSS margin-block-start property. Initial value: 0. Not inherited.

Open entry

margin-inline

margin-inline: <'margin-top'>{1,2}

The CSS margin-inline property. Initial value: margin-inline-start,margin-inline-end. Not inherited.

Open entry

margin-inline-end

margin-inline-end: <'margin-top'>

The CSS margin-inline-end property. Initial value: 0. Not inherited.

Open entry

margin-inline-start

margin-inline-start: <'margin-top'>

The CSS margin-inline-start property. Initial value: 0. Not inherited.

Open entry

max-block-size

max-block-size: <'max-width'>

The CSS max-block-size property. Initial value: none. Not inherited.

Open entry

max-inline-size

max-inline-size: <'max-width'>

The CSS max-inline-size property. Initial value: none. Not inherited.

Open entry

min-block-size

min-block-size: <'min-width'>

The CSS min-block-size property. Initial value: 0. Not inherited.

Open entry

min-inline-size

min-inline-size: <'min-width'>

The CSS min-inline-size property. Initial value: 0. Not inherited.

Open entry

padding-block

padding-block: <'padding-top'>{1,2}

The CSS padding-block property. Initial value: padding-block-start,padding-block-end. Not inherited.

Open entry

padding-block-end

padding-block-end: <'padding-top'>

The CSS padding-block-end property. Initial value: 0. Not inherited.

Open entry

padding-block-start

padding-block-start: <'padding-top'>

The CSS padding-block-start property. Initial value: 0. Not inherited.

Open entry

padding-inline

padding-inline: <'padding-top'>{1,2}

The CSS padding-inline property. Initial value: padding-inline-start,padding-inline-end. Not inherited.

Open entry

padding-inline-end

padding-inline-end: <'padding-top'>

The CSS padding-inline-end property. Initial value: 0. Not inherited.

Open entry

padding-inline-start

padding-inline-start: <'padding-top'>

The CSS padding-inline-start property. Initial value: 0. Not inherited.

Open entry

Properties — CSS Masking

clip-path

clip-path: <clip-source> | [ <basic-shape> || <geometry-box> ] | none

The CSS clip-path property. Initial value: none. Not inherited.

Open entry

clip-rule

clip-rule: nonzero | evenodd

The CSS clip-rule property. Initial value: nonzero. Inherited.

Open entry

mask

mask: <mask-layer>#

The CSS mask property. Initial value: mask-image,mask-mode,mask-repeat,mask-position,mask-clip,mask-origin,mask-size,mask-composite. Not inherited.

Open entry

mask-border

mask-border: <'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>

The CSS mask-border property. Initial value: mask-border-mode,mask-border-outset,mask-border-repeat,mask-border-slice,mask-border-source,mask-border-width. Not inherited.

Open entry

mask-border-mode

mask-border-mode: luminance | alpha

The CSS mask-border-mode property. Initial value: alpha. Not inherited.

Open entry

mask-border-outset

mask-border-outset: [ <length> | <number> ]{1,4}

The CSS mask-border-outset property. Initial value: 0. Not inherited.

Open entry

mask-border-repeat

mask-border-repeat: [ stretch | repeat | round | space ]{1,2}

The CSS mask-border-repeat property. Initial value: stretch. Not inherited.

Open entry

mask-border-slice

mask-border-slice: <number-percentage>{1,4} fill?

The CSS mask-border-slice property. Initial value: 0. Not inherited.

Open entry

mask-border-source

mask-border-source: none | <image>

The CSS mask-border-source property. Initial value: none. Not inherited.

Open entry

mask-border-width

mask-border-width: [ <length-percentage> | <number> | auto ]{1,4}

The CSS mask-border-width property. Initial value: auto. Not inherited.

Open entry

mask-clip

mask-clip: [ <coord-box> | no-clip ]#

The CSS mask-clip property. Initial value: border-box. Not inherited.

Open entry

mask-composite

mask-composite: <compositing-operator>#

The CSS mask-composite property. Initial value: add. Not inherited.

Open entry

mask-image

mask-image: <mask-reference>#

The CSS mask-image property. Initial value: none. Not inherited.

Open entry

mask-mode

mask-mode: <masking-mode>#

The CSS mask-mode property. Initial value: match-source. Not inherited.

Open entry

mask-origin

mask-origin: <coord-box>#

The CSS mask-origin property. Initial value: border-box. Not inherited.

Open entry

mask-position

mask-position: <position>#

The CSS mask-position property. Initial value: 0% 0%. Not inherited.

Open entry

mask-repeat

mask-repeat: <repeat-style>#

The CSS mask-repeat property. Initial value: repeat. Not inherited.

Open entry

mask-size

mask-size: <bg-size>#

The CSS mask-size property. Initial value: auto. Not inherited.

Open entry

mask-type

mask-type: luminance | alpha

The CSS mask-type property. Initial value: luminance. Not inherited.

Open entry

Properties — CSS Mobile Text Size Adjustment

Properties — CSS Multi-column Layout

Properties — CSS Overflow

line-clamp

line-clamp: none | <integer>

The CSS line-clamp property. Initial value: none. Not inherited.

Open entry

max-lines

max-lines: none | <integer>

The CSS max-lines property. Initial value: none. Not inherited.

Open entry

overflow-block

overflow-block: visible | hidden | clip | scroll | auto

The CSS overflow-block property. Initial value: auto. Not inherited.

Open entry

overflow-clip-margin

overflow-clip-margin: <visual-box> || <length [0,∞]>

The CSS overflow-clip-margin property. Initial value: 0px. Not inherited.

Open entry

overflow-inline

overflow-inline: visible | hidden | clip | scroll | auto

The CSS overflow-inline property. Initial value: auto. Not inherited.

Open entry

overflow-x

overflow-x: visible | hidden | clip | scroll | auto

The CSS overflow-x property. Initial value: visible. Not inherited.

Open entry

overflow-y

overflow-y: visible | hidden | clip | scroll | auto

The CSS overflow-y property. Initial value: visible. Not inherited.

Open entry

scroll-axis-lock

scroll-axis-lock: auto | none

The CSS scroll-axis-lock property. Initial value: auto. Not inherited.

Open entry

scroll-behavior

scroll-behavior: auto | smooth

The CSS scroll-behavior property. Initial value: auto. Not inherited.

Open entry

scroll-marker-group

scroll-marker-group: none | before | after

The CSS scroll-marker-group property. Initial value: none. Not inherited.

Open entry

scroll-target-group

scroll-target-group: none | auto

The CSS scroll-target-group property. Initial value: none. Not inherited.

Open entry

scrollbar-gutter

scrollbar-gutter: auto | stable && both-edges?

The CSS scrollbar-gutter property. Initial value: auto. Not inherited.

Open entry

Properties — CSS Overscroll Behavior

Properties — CSS Positioned Layout

Properties — CSS Rhythmic Sizing

Properties — CSS Ruby

Properties — CSS Scroll Anchoring

Properties — CSS Scroll Snap

scroll-initial-target

scroll-initial-target: none | nearest

The CSS scroll-initial-target property. Initial value: none. Not inherited.

Open entry

scroll-margin

scroll-margin: <length>{1,4}

The CSS scroll-margin property. Initial value: scroll-margin-bottom,scroll-margin-left,scroll-margin-right,scroll-margin-top. Not inherited.

Open entry

scroll-margin-block

scroll-margin-block: <length>{1,2}

The CSS scroll-margin-block property. Initial value: scroll-margin-block-start,scroll-margin-block-end. Not inherited.

Open entry

scroll-margin-block-end

scroll-margin-block-end: <length>

The CSS scroll-margin-block-end property. Initial value: 0. Not inherited.

Open entry

scroll-margin-block-start

scroll-margin-block-start: <length>

The CSS scroll-margin-block-start property. Initial value: 0. Not inherited.

Open entry

scroll-margin-bottom

scroll-margin-bottom: <length>

The CSS scroll-margin-bottom property. Initial value: 0. Not inherited.

Open entry

scroll-margin-inline

scroll-margin-inline: <length>{1,2}

The CSS scroll-margin-inline property. Initial value: scroll-margin-inline-start,scroll-margin-inline-end. Not inherited.

Open entry

scroll-margin-inline-end

scroll-margin-inline-end: <length>

The CSS scroll-margin-inline-end property. Initial value: 0. Not inherited.

Open entry

scroll-margin-inline-start

scroll-margin-inline-start: <length>

The CSS scroll-margin-inline-start property. Initial value: 0. Not inherited.

Open entry

scroll-margin-left

scroll-margin-left: <length>

The CSS scroll-margin-left property. Initial value: 0. Not inherited.

Open entry

scroll-margin-right

scroll-margin-right: <length>

The CSS scroll-margin-right property. Initial value: 0. Not inherited.

Open entry

scroll-margin-top

scroll-margin-top: <length>

The CSS scroll-margin-top property. Initial value: 0. Not inherited.

Open entry

scroll-padding

scroll-padding: [ auto | <length-percentage> ]{1,4}

The CSS scroll-padding property. Initial value: scroll-padding-bottom,scroll-padding-left,scroll-padding-right,scroll-padding-top. Not inherited.

Open entry

scroll-padding-block

scroll-padding-block: [ auto | <length-percentage> ]{1,2}

The CSS scroll-padding-block property. Initial value: scroll-padding-block-start,scroll-padding-block-end. Not inherited.

Open entry

scroll-padding-block-end

scroll-padding-block-end: auto | <length-percentage>

The CSS scroll-padding-block-end property. Initial value: auto. Not inherited.

Open entry

scroll-padding-block-start

scroll-padding-block-start: auto | <length-percentage>

The CSS scroll-padding-block-start property. Initial value: auto. Not inherited.

Open entry

scroll-padding-bottom

scroll-padding-bottom: auto | <length-percentage>

The CSS scroll-padding-bottom property. Initial value: auto. Not inherited.

Open entry

scroll-padding-inline

scroll-padding-inline: [ auto | <length-percentage> ]{1,2}

The CSS scroll-padding-inline property. Initial value: scroll-padding-inline-start,scroll-padding-inline-end. Not inherited.

Open entry

scroll-padding-inline-end

scroll-padding-inline-end: auto | <length-percentage>

The CSS scroll-padding-inline-end property. Initial value: auto. Not inherited.

Open entry

scroll-padding-inline-start

scroll-padding-inline-start: auto | <length-percentage>

The CSS scroll-padding-inline-start property. Initial value: auto. Not inherited.

Open entry

scroll-padding-left

scroll-padding-left: auto | <length-percentage>

The CSS scroll-padding-left property. Initial value: auto. Not inherited.

Open entry

scroll-padding-right

scroll-padding-right: auto | <length-percentage>

The CSS scroll-padding-right property. Initial value: auto. Not inherited.

Open entry

scroll-padding-top

scroll-padding-top: auto | <length-percentage>

The CSS scroll-padding-top property. Initial value: auto. Not inherited.

Open entry

scroll-snap-align

scroll-snap-align: [ none | start | end | center ]{1,2}

The CSS scroll-snap-align property. Initial value: none. Not inherited.

Open entry

scroll-snap-stop

scroll-snap-stop: normal | always

The CSS scroll-snap-stop property. Initial value: normal. Not inherited.

Open entry

scroll-snap-type

scroll-snap-type: none | [ x | y | block | inline | both ] [ mandatory | proximity ]?

The CSS scroll-snap-type property. Initial value: none. Not inherited.

Open entry

Properties — CSS Scrollbars Styling

Properties — CSS Shapes

Properties — CSS Speech

Properties — CSS Table

Properties — CSS Text

hanging-punctuation

hanging-punctuation: none | [ first || [ force-end | allow-end ] || last ]

The CSS hanging-punctuation property. Initial value: none. Inherited.

Open entry

hyphenate-character

hyphenate-character: auto | <string>

The CSS hyphenate-character property. Initial value: auto. Inherited.

Open entry

hyphenate-limit-chars

hyphenate-limit-chars: [ auto | <integer> ]{1,3}

The CSS hyphenate-limit-chars property. Initial value: auto. Inherited.

Open entry

hyphens

hyphens: none | manual | auto

The CSS hyphens property. Initial value: manual. Inherited.

Open entry

line-break

line-break: auto | loose | normal | strict | anywhere

The CSS line-break property. Initial value: auto. Inherited.

Open entry

tab-size

tab-size: <integer> | <length>

The CSS tab-size property. Initial value: 8. Inherited.

Open entry

text-align-last

text-align-last: auto | start | end | left | right | center | justify

The CSS text-align-last property. Initial value: auto. Inherited.

Open entry

text-autospace

text-autospace: normal | <autospace> | auto

The CSS text-autospace property. Initial value: normal. Inherited.

Open entry

text-fit

text-fit: [ none | grow | shrink ] [consistent | per-line | per-line-all]? <percentage>?

The CSS text-fit property. Initial value: none. Inherited.

Open entry

text-justify

text-justify: auto | inter-character | inter-word | none

The CSS text-justify property. Initial value: auto. Inherited.

Open entry

text-spacing-trim

text-spacing-trim: space-all | normal | space-first | trim-start

The CSS text-spacing-trim property. Initial value: normal. Inherited.

Open entry

text-wrap

text-wrap: <'text-wrap-mode'> || <'text-wrap-style'>

The CSS text-wrap property. Initial value: wrap. Inherited.

Open entry

text-wrap-mode

text-wrap-mode: wrap | nowrap

The CSS text-wrap-mode property. Initial value: wrap. Inherited.

Open entry

text-wrap-style

text-wrap-style: auto | balance | stable | pretty

The CSS text-wrap-style property. Initial value: auto. Inherited.

Open entry

white-space-collapse

white-space-collapse: collapse | preserve | preserve-breaks | preserve-spaces | break-spaces

The CSS white-space-collapse property. Initial value: collapse. Inherited.

Open entry

word-break

word-break: normal | break-all | keep-all | break-word | auto-phrase

The CSS word-break property. Initial value: normal. Inherited.

Open entry

word-wrap

word-wrap: normal | break-word

The CSS word-wrap property. Initial value: normal. Inherited.

Open entry

Properties — CSS Text Decoration

text-decoration-color

text-decoration-color: <color>

The CSS text-decoration-color property. Initial value: currentcolor. Not inherited.

Open entry

text-decoration-inset

text-decoration-inset: <length-percentage>{1,2} | auto

The CSS text-decoration-inset property. Initial value: 0. Not inherited.

Open entry

text-decoration-line

text-decoration-line: none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error

The CSS text-decoration-line property. Initial value: none. Not inherited.

Open entry

text-decoration-skip

text-decoration-skip: none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]

The CSS text-decoration-skip property. Initial value: objects. Inherited.

Open entry

text-decoration-skip-ink

text-decoration-skip-ink: auto | all | none

The CSS text-decoration-skip-ink property. Initial value: auto. Inherited.

Open entry

text-decoration-style

text-decoration-style: solid | double | dotted | dashed | wavy

The CSS text-decoration-style property. Initial value: solid. Not inherited.

Open entry

text-decoration-thickness

text-decoration-thickness: auto | from-font | <length> | <percentage>

The CSS text-decoration-thickness property. Initial value: auto. Not inherited.

Open entry

text-emphasis

text-emphasis: <'text-emphasis-style'> || <'text-emphasis-color'>

The CSS text-emphasis property. Initial value: text-emphasis-style,text-emphasis-color. Inherited.

Open entry

text-emphasis-color

text-emphasis-color: <color>

The CSS text-emphasis-color property. Initial value: currentcolor. Inherited.

Open entry

text-emphasis-position

text-emphasis-position: auto | [ over | under ] && [ right | left ]?

The CSS text-emphasis-position property. Initial value: auto. Inherited.

Open entry

text-emphasis-style

text-emphasis-style: none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>

The CSS text-emphasis-style property. Initial value: none. Inherited.

Open entry

text-underline-offset

text-underline-offset: auto | <length> | <percentage>

The CSS text-underline-offset property. Initial value: auto. Inherited.

Open entry

text-underline-position

text-underline-position: auto | from-font | [ under || [ left | right ] ]

The CSS text-underline-position property. Initial value: auto. Inherited.

Open entry

Properties — CSS Transforms

Properties — CSS Transitions

Properties — CSS Values and Units

Properties — CSS View Transitions

Properties — CSS Viewport

Properties — CSS Writing Modes

Properties — Filter Effects

Properties — MathML

Properties — Motion Path

Properties — Pointer Events

Properties — Scalable Vector Graphics

cx

cx: <length> | <percentage>

The CSS cx property. Initial value: 0. Not inherited.

Open entry

cy

cy: <length> | <percentage>

The CSS cy property. Initial value: 0. Not inherited.

Open entry

d

d: none | path(<string>)

The CSS d property. Initial value: none. Not inherited.

Open entry

fill

fill: <paint>

The CSS fill property. Initial value: black. Inherited.

Open entry

fill-opacity

fill-opacity: <'opacity'>

The CSS fill-opacity property. Initial value: 1. Inherited.

Open entry

fill-rule

fill-rule: nonzero | evenodd

The CSS fill-rule property. Initial value: nonzero. Inherited.

Open entry

marker-end

marker-end: none | <url>

The CSS marker-end property. Initial value: none. Inherited.

Open entry

marker-mid

marker-mid: none | <url>

The CSS marker-mid property. Initial value: none. Inherited.

Open entry

marker-start

marker-start: none | <url>

The CSS marker-start property. Initial value: none. Inherited.

Open entry

paint-order

paint-order: normal | [ fill || stroke || markers ]

The CSS paint-order property. Initial value: normal. Inherited.

Open entry

path-length

path-length: none | <length> [0,∞]

The CSS path-length property. Initial value: none. Not inherited.

Open entry

r

r: <length> | <percentage>

The CSS r property. Initial value: 0. Not inherited.

Open entry

rx

rx: <length-percentage> | auto

The CSS rx property. Initial value: auto. Not inherited.

Open entry

ry

ry: <length-percentage> | auto

The CSS ry property. Initial value: auto. Not inherited.

Open entry

shape-rendering

shape-rendering: auto | optimizeSpeed | crispEdges | geometricPrecision

The CSS shape-rendering property. Initial value: auto. Inherited.

Open entry

stop-color

stop-color: <'color'>

The CSS stop-color property. Initial value: black. Not inherited.

Open entry

stop-opacity

stop-opacity: <'opacity'>

The CSS stop-opacity property. Initial value: black. Not inherited.

Open entry

stroke

stroke: <paint>

The CSS stroke property. Initial value: stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width. Inherited.

Open entry

stroke-color

stroke-color: <color>

The CSS stroke-color property. Initial value: transparent. Inherited.

Open entry

stroke-dasharray

stroke-dasharray: none | <dasharray>

The CSS stroke-dasharray property. Initial value: none. Inherited.

Open entry

stroke-dashoffset

stroke-dashoffset: <length-percentage> | <number>

The CSS stroke-dashoffset property. Initial value: 0. Inherited.

Open entry

stroke-linecap

stroke-linecap: butt | round | square

The CSS stroke-linecap property. Initial value: butt. Inherited.

Open entry

stroke-linejoin

stroke-linejoin: miter | miter-clip | round | bevel | arcs

The CSS stroke-linejoin property. Initial value: miter. Inherited.

Open entry

stroke-miterlimit

stroke-miterlimit: <number>

The CSS stroke-miterlimit property. Initial value: 4. Inherited.

Open entry

stroke-opacity

stroke-opacity: <'opacity'>

The CSS stroke-opacity property. Initial value: 1. Inherited.

Open entry

stroke-width

stroke-width: <length-percentage> | <number>

The CSS stroke-width property. Initial value: 1px. Inherited.

Open entry

text-anchor

text-anchor: start | middle | end

The CSS text-anchor property. Initial value: start. Inherited.

Open entry

text-rendering

text-rendering: auto | optimizeSpeed | optimizeLegibility | geometricPrecision

The CSS text-rendering property. Initial value: auto. Inherited.

Open entry

vector-effect

vector-effect: none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position

The CSS vector-effect property. Initial value: none. Not inherited.

Open entry

x

x: <length> | <percentage>

The CSS x property. Initial value: 0. Not inherited.

Open entry

y

y: <length> | <percentage>

The CSS y property. Initial value: 0. Not inherited.

Open entry

Properties — Scroll-driven Animations

animation-range

animation-range: [ <'animation-range-start'> <'animation-range-end'>? ]#

The CSS animation-range property. Initial value: animation-range-start,animation-range-end. Not inherited.

Open entry

animation-range-end

animation-range-end: [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS animation-range-end property. Initial value: normal. Not inherited.

Open entry

animation-range-start

animation-range-start: [ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#

The CSS animation-range-start property. Initial value: normal. Not inherited.

Open entry

scroll-timeline

scroll-timeline: [ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#

The CSS scroll-timeline property. Initial value: scroll-timeline-name,scroll-timeline-axis. Not inherited.

Open entry

scroll-timeline-axis

scroll-timeline-axis: [ block | inline | x | y ]#

The CSS scroll-timeline-axis property. Initial value: block. Not inherited.

Open entry

scroll-timeline-name

scroll-timeline-name: [ none | <dashed-ident> ]#

The CSS scroll-timeline-name property. Initial value: none. Not inherited.

Open entry

timeline-scope

timeline-scope: none | <dashed-ident>#

The CSS timeline-scope property. Initial value: none. Not inherited.

Open entry

view-timeline

view-timeline: [ <'view-timeline-name'> [ <'view-timeline-axis'> || <'view-timeline-inset'> ]? ]#

The CSS view-timeline property. Initial value: view-timeline-name,view-timeline-axis. Not inherited.

Open entry

view-timeline-axis

view-timeline-axis: [ block | inline | x | y ]#

The CSS view-timeline-axis property. Initial value: block. Not inherited.

Open entry

view-timeline-inset

view-timeline-inset: [ [ auto | <length-percentage> ]{1,2} ]#

The CSS view-timeline-inset property. Initial value: auto. Not inherited.

Open entry

view-timeline-name

view-timeline-name: [ none | <dashed-ident> ]#

The CSS view-timeline-name property. Initial value: none. Not inherited.

Open entry

Selectors and cascade

::after

::after

Inserts generated content after an element, often used for clearfixes or decoration.

Open entry

::before

::before

Inserts generated content before an element. It is not in the DOM and not read reliably by screen readers.

Open entry

::placeholder

::placeholder

Styles placeholder text. Placeholders are hints, not labels; always keep a visible label.

Open entry

::selection

::selection

Styles text the user has selected.

Open entry

:active

:active

Matches while an element is being pressed.

Open entry

:checked

:checked

Matches checked radio buttons and checkboxes, or selected options.

Open entry

:disabled

:disabled

Matches disabled form controls. It does not constrain normal elements; use :not([disabled]) for pointer rules.

Open entry

:empty

:empty

Matches elements with no children, including whitespace-only text nodes.

Open entry

:first-child

:first-child

Matches an element that is the first child of its parent.

Open entry

:focus

:focus

Styles the element that currently has focus. Never remove the outline without a replacement.

Open entry

:focus-visible

:focus-visible

Matches keyboard focus while avoiding a ring on mouse clicks. The modern accessible default.

Open entry

:has()

form:has(input:invalid)

Matches an element if it contains something that matches the inner selector.

Open entry

:hover

:hover

Styles an element while the pointer is over it. Never put essential information behind hover only.

Open entry

:invalid

:invalid

Matches a control whose value does not satisfy its constraints.

Open entry

:is()

:is(h1, h2, h3)

Matches any selector in the list and adopts the highest specificity in it. Handy for grouping.

Open entry

:last-child

:last-child

Matches an element that is the last child of its parent.

Open entry

:not()

:not(.quiet)

Excludes elements that match the inner selector. Chain :not() for multiple exclusions.

Open entry

:nth-child()

li:nth-child(2n)

Matches elements by position among their siblings. Use odd, even or an+b patterns.

Open entry

:nth-of-type()

p:nth-of-type(2)

Matches by position among siblings of the same tag.

Open entry

:where()

:where(h1, h2)

Like :is() but with zero specificity, so later rules override it without a fight.

Open entry

!important

color: red !important;

Forces a declaration above normal cascade rules. Treat it as a warning sign, not a tool.

Open entry

.class selector

.card { … }

Targets every element with that class. Classes are reusable and belong in stylesheets.

Open entry

#id selector

#hero { … }

Targets the one element with that id. Prefer classes for styling; ids are for anchors and labels.

Open entry

Adjacent sibling

h2 + p { … }

Selects the element immediately after another with the same parent.

Open entry

Attribute selector

a[target="_blank"] { … }

Targets elements by attribute or attribute value. Operators include =, ^=, $=, *= and ~=.

Open entry

Child combinator

nav > a { … }

Selects only direct children. Safer than descendant when nesting can grow.

Open entry

Descendant combinator

article p { … }

Selects descendants at any depth, not just direct children.

Open entry

General sibling

h2 ~ p { … }

Selects every matching sibling after the first element.

Open entry

Pseudo-class

:hover, :focus, :active

A keyword that selects an element in a particular state without changing the markup.

Open entry

Pseudo-element

::before, ::after, ::marker

A keyword that selects a part of an element, such as the first line, first letter or a marker.

Open entry

Specificity

id > class > type

The weight that decides which rule wins. Inline styles beat selectors; !important beats everything.

Open entry

Type selector

button { … }

Targets every element of that tag name. Great for base styles.

Open entry

Universal selector

* { … }

Targets every element. Use sparingly, usually for box-sizing or resets.

Open entry

The box model

aspect-ratio

aspect-ratio: 16 / 9

Locks a box to a ratio so it reserves space before media loads.

Open entry

border

border: 1px solid #d8d0c6

Sets width, style and colour of the border in one shorthand.

Open entry

border-radius

border-radius: 12px

Rounds corners. Use 50% for a circle on a square box.

Open entry

box-shadow

box-shadow: 0 8px 24px rgb(0 0 0 / 0.12)

Draws shadows outside or inside the box. Multiple shadows are comma-separated.

Open entry

box-sizing

box-sizing: border-box

Makes width include padding and border. Almost every project should set it globally.

Open entry

height

height: auto

Sets the content height. Prefer min-height over fixed heights so content can grow.

Open entry

margin

margin: 16px auto

Space outside the border. Auto horizontal margins centre a fixed-width block.

Open entry

margin-block / margin-inline

margin-block: 16px

Logical shorthand for vertical and horizontal margins that follows writing direction.

Open entry

min-width / max-width

max-width: 60ch

Caps or floors the size. max-width: 100% keeps images inside their container.

Open entry

object-fit

object-fit: cover

How replaced content such as images fills its box without distorting.

Open entry

object-position

object-position: center

Chooses the focal point when object-fit crops the media.

Open entry

outline

outline: 2px solid

A ring drawn outside the border that does not affect layout. Essential for focus styles.

Open entry

overflow

overflow: hidden

Controls what happens when content is larger than the box: visible, hidden, scroll or auto.

Open entry

padding

padding: 12px 16px

Space inside the border, between border and content.

Open entry

width

width: 100%

Sets the content width. With box-sizing: border-box it includes padding and border.

Open entry

Typography

font-family

font-family: system-ui, sans-serif

A fallback list of fonts. End with a generic family so text always renders.

Open entry

font-size

font-size: clamp(1rem, 2.5vw, 1.5rem)

The text size. Prefer rem for accessibility, because it respects the user’s root size.

Open entry

font-style

font-style: italic

Normal, italic or oblique text.

Open entry

font-variant-numeric

font-variant-numeric: tabular-nums

Chooses numeric glyph styles. Tabular numerals keep columns aligned in tables.

Open entry

font-weight

font-weight: 600

Thickness of the type: 100–900 or normal/bold. Only use weights the font actually includes.

Open entry

letter-spacing

letter-spacing: 0.02em

Space between characters. Small positive values can improve uppercase labels.

Open entry

line-height

line-height: 1.6

Vertical distance between lines. Unitless values scale with font size and are usually safest.

Open entry

list-style

list-style: disc inside

Sets marker type and position for list items.

Open entry

overflow-wrap

overflow-wrap: anywhere

Breaks long words that would otherwise overflow their container.

Open entry

text-align

text-align: center

Aligns inline content: left, right, center, justify or start/end for logical direction.

Open entry

text-decoration

text-decoration: underline wavy

Decorations such as underline, overline and line-through with style and colour.

Open entry

text-indent

text-indent: 2em

Indents the first line of a block of text.

Open entry

text-overflow

text-overflow: ellipsis

Shows an ellipsis when text overflows. Requires overflow:hidden and white-space:nowrap.

Open entry

text-shadow

text-shadow: 0 1px 2px rgb(0 0 0 / 0.3)

Adds a shadow to the glyphs. Keep it subtle for readability.

Open entry

text-transform

text-transform: uppercase

Changes letter case visually without changing the underlying text.

Open entry

user-select

user-select: none

Controls whether text can be selected. Do not block selection on content people may want to copy.

Open entry

white-space

white-space: nowrap

Controls wrapping and whitespace collapsing.

Open entry

word-spacing

word-spacing: 0.1em

Extra space between words.

Open entry

Units

% (percentage)

50%

Relative to the containing block or another property’s value, depending on the property.

Open entry

cap

1cap

The cap height of the current font.

Open entry

ch

60ch

The width of the 0 glyph in the current font. Excellent for readable line lengths.

Open entry

cm / mm / in

2.54cm

Physical units for print styles. One inch equals 2.54cm.

Open entry

cqmin / cqmax

10cqmin

One percent of the smaller or larger container dimension.

Open entry

cqw / cqh

50cqw

One percent of a container query container’s width or height.

Open entry

deg

45deg

Degrees, used by gradients, rotation and hue.

Open entry

dpi / dppx

96dpi

Resolution units for media queries and image sets.

Open entry

dvh / svh / lvh

100dvh

Dynamic, small and large viewport heights that account for mobile browser chrome.

Open entry

em

1.5em

Relative to the element’s own font size. Compounds when nested.

Open entry

ex

1ex

The x-height of the current font, a measure of lowercase height.

Open entry

fr

1fr

A fraction of the free space in a grid track.

Open entry

grad

50grad

Gradians. A full turn is 400grad.

Open entry

lh

1.5lh

The line height of the element. Useful for vertical rhythm that follows type.

Open entry

pt / pc

12pt

Print-oriented points and picas. Prefer rem for screen typography.

Open entry

px

10px

A CSS pixel. The reference unit for borders, shadows and small spacing.

Open entry

rad

0.5rad

Radians for angles.

Open entry

rem

1.5rem

Relative to the root font size. Predictable for spacing and type scales.

Open entry

s / ms

200ms

Seconds and milliseconds for durations.

Open entry

turn

0.25turn

Turns. A full turn is 1turn, which is easier to read than 360deg.

Open entry

vh

50vh

One percent of the viewport height. On mobile, use dvh to avoid browser chrome jumps.

Open entry

vmin / vmax

10vmin

One percent of the smaller or larger viewport dimension.

Open entry

vw

50vw

One percent of the viewport width. Ignores scrollbars in some browsers; prefer dvw for full layouts.

Open entry
Keep going

Turn the reference into recall.

Read the full lesson, then solve the challenge without looking. That is where the knowledge sticks.