Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

Knowledge base — CSS

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 899

CSS

ex — the font x-height unit

The ex length unit refers to the x-height of the first available font. It lets dimensions follow font metrics, but does not represent a fixed pixel count or always equal half an em.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

fr — flexible grid track unit

The fr unit distributes leftover space among CSS Grid tracks, subject to flex factors and sizing constraints.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

grad — angle unit

The `grad` unit expresses angles in gradians: a full turn is `400grad`, and a right angle is `100grad`. Use it wherever CSS syntax accepts an `<angle>`.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

ic — ideographic font-relative length unit

The ic unit measures lengths using the metrics of the 水 glyph in the font used to render it. It is useful for dimensions based on CJK characters.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

in — the CSS inch length unit

The `in` unit represents a CSS inch: `1in = 96px = 2.54cm`. It is an absolute length unit, but it does not guarantee a physical one-inch measurement on a screen.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

lh — line-height unit

The lh unit ties lengths to an element’s line-height. It aligns spacing with the text rhythm but does not measure actual rendered lines.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

lvh — large viewport height

The lvh unit represents 1% of the large viewport height, determined assuming retractable browser interface elements are hidden.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

lvmax — larger dimension of the large viewport

The lvmax unit is 1% of the larger dimension of the large viewport, calculated assuming retractable browser interfaces are retracted.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

lvmin — the large viewport’s smaller dimension

The lvmin unit represents 1% of the large viewport’s smaller dimension, calculated with retractable browser interface elements assumed hidden.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

lvw — large viewport width unit

The lvw unit represents 1% of the large viewport width: the size calculated with dynamically retractable browser interface elements assumed to be retracted.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

mm — CSS millimeter

The mm unit represents an absolute CSS length: 25.4mm equals 96px, but does not guarantee physical millimeters on screen.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

ms — millisecond

The `ms` unit represents time in CSS. One millisecond is one thousandth of a second: `250ms` and `0.25s` represent the same duration. Use it in properties that accept values of type `<time>`.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

pc — the pica length unit

The CSS pc unit represents picas, an absolute length unit: 1pc = 12pt = 16px. It has fixed ratios to other absolute units but does not guarantee a real-world physical size on a screen.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

pt — CSS point

The pt unit represents a CSS point: 1/72 of a CSS inch. Its conversion to px is fixed and independent of font size.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

px — CSS pixel

px is an absolute CSS length unit. Its relationship to other absolute units is fixed: 96px = 1in. A CSS pixel does not necessarily correspond to one physical screen pixel.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate; usage example verified in isolated Chromium 157.0.8103.51
CSS

Q — quarter-millimeter

Q is an absolute CSS length unit: 1Q = 0.25mm. It has a fixed conversion to px but does not guarantee an actual physical measurement on a screen.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate; the usage example passed verification in isolated Chromium 157.0.8103.51
CSS

rad — angle unit in radians

The `rad` unit expresses CSS angles in radians. A full turn is 2π radians; values using this unit belong to the `<angle>` type.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, exact-source verification for the usage example passed
CSS

rcap — root-element cap-height unit

The rcap unit expresses a length relative to the root element’s font cap height. On a descendant, unlike cap, it does not depend on that descendant’s font size. On the root itself, changing its font size can change a width expressed in rcap.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, exact-source example verification passed
CSS

rch — the root element’s ch unit

The rch length unit equals ch on the document’s root element. It sizes elements using root font metrics rather than the local font size.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

rem — a unit relative to the root font size

The rem unit expresses a length relative to the document root element’s computed font-size. It lets text sizes and spacing share one reference size, independently of the parent element’s font size.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

rex — root element x-height unit

The rex unit expresses a length relative to the root element's font x-height rather than the current element's font.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

ric — the root ideographic unit

The ric unit equals ic on the document’s root element. It sizes lengths using the root’s ideographic metrics rather than a descendant’s font size.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

rlh — root line-height unit

The rlh unit expresses a length relative to the root element’s line-height, not that of the element using it.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

s — the CSS second

The `s` unit represents seconds in CSS `<time>` values. A value of `0.5s` equals `500ms`. It can be used, for example, to specify transition durations and delays.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required