Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

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

Entries: 5788

CSS

::view-transition-group() — view transition group

The ::view-transition-group() pseudo-element represents a named view transition group. It controls the group's geometry animation and the animation timing of its descendant old-state and new-state images.

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

::view-transition-group-children() — nested group container

A view-transition pseudo-element containing nested groups. It lets you clip their contents during animation without clipping the parent group's image pair.

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

::view-transition-image-pair() — transition image-pair container

The ::view-transition-image-pair() pseudo-element groups corresponding old-state and new-state images during a view transition. It lets you clip those images together and control the isolation of their blending.

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

::view-transition-new() — new-state image

The ::view-transition-new() pseudo-element styles the new-state image during a view transition, for example by giving it a custom entrance animation.

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

::view-transition-old() — the old-state image

The ::view-transition-old() pseudo-element represents a static capture of the previous state during a view transition. It lets you animate the outgoing image independently of the new state, without styling the previous DOM element.

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

:visited — visited-link pseudo-class

The :visited pseudo-class styles visited hyperlinks. Its behavior depends on browser history and privacy protections.

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

:where() — matching without adding specificity

The :where() pseudo-class matches elements against a selector list, but contributes zero specificity, including its arguments. It helps create easy-to-override base styles.

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

:xr-overlay — the active WebXR DOM overlay root

The :xr-overlay pseudo-class matches the DOM overlay element during an immersive WebXR session, allowing interface styling without manually toggling a class.

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

CSS comments

A CSS comment uses /* ... */ and can span multiple lines. Use comments to explain code or temporarily disable declarations, but remember that comments cannot be nested.

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

CSS syntax: rules and declarations

Learn the distinction between a CSS qualified rule and a declaration: the selector identifies elements, while declarations inside the block specify properties and values. Also see how the browser handles an invalid value.

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

Inspecting and editing CSS in DevTools

The CSS DevTools inspector lets you examine a selected element’s CSS rules and test changes in the browser. Learn to distinguish declarations in Styles from values in Computed, then transfer checked fixes to your source files.

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

cap — the capital-height unit

The cap unit measures the selected font’s capital height. It lets an element’s dimensions follow typography rather than font-size alone.

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

ch — a length unit based on the zero glyph

The ch unit measures length relative to the advance measure of the 0 glyph in the font being used. It helps size text-based layouts but does not represent a count of arbitrary characters.

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

cm — CSS centimeter

cm is an absolute CSS length unit representing centimeters. The fixed relationship is 2.54cm = 96px, but this does not guarantee agreement with a physical ruler on screen.

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

cqb — container block-size unit

The cqb unit expresses a length relative to a query container’s block size, which is not always its height.

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

cqh — container height unit

The cqh unit expresses lengths relative to an eligible container’s height rather than directly relative to the browser viewport.

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

cqi — container-relative inline-size unit

The cqi unit represents 1% of a container’s inline size. It lets elements scale relative to their container rather than the entire viewport.

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

cqmax — the larger container-relative unit

The cqmax length unit selects the larger of 1cqi and 1cqb. It scales an element relative to container dimensions, with a container selected independently for each axis.

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

cqmin — the smaller container unit

The cqmin length unit equals the smaller of 1cqi and 1cqb. It lets dimensions scale relative to containers rather than only relative to the viewport.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate; example verification recorded, browser execution not explicitly documented
CSS

cqw — container width unit

The cqw unit represents 1% of the width of the nearest eligible query container, which is not necessarily the parent.

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

deg — degrees of an angle

The deg unit expresses CSS angles in degrees: 360deg is a full turn and 90deg is a quarter turn. Use it where the syntax accepts the <angle> type.

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

dpcm — dots per centimeter

The CSS unit dpcm expresses resolution in dots per centimeter. It is used in contexts such as resolution media queries, rather than for specifying element lengths.

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

dpi — resolution unit

The dpi unit measures dots per CSS inch. It belongs to the <resolution> type, not the length type, and can be used to query pixel density in media queries.

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

dppx — resolution unit

The dppx unit describes the number of dots per CSS pixel. It belongs to the <resolution> type, not to length units; 1dppx equals 96dpi.

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