HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

container

Description

The container property for CSS is shorthand for container-name and container-type.

Syntax

CSS

container: value;

JS

object.style.container = "value";

Values

<'container'> = <'container-name'> [ / <'container-type'> ]?
<'container-name'> = none | <custom-ident>+
none

The query container has no query container name.

<custom-ident>

Specifies any valid identifier that is not misinterpreted as a keyword.

<'container-type'> = normal || [ size | inline-size ]
normal

The element is not a query container for any container size queries, but remains a query container for container style queries.

size

Establishes a query container for container size queries on both the inline and block axis. Applies layout containment, style containment, and size containment to the principal box.

inline-size

Establishes a query container for container size queries on the container’s own inline axis. Applies layout containment, style containment, and inline-size containment to the principal box.

Examples

1 · container-name · none

2 · container-name · custom-ident

3 · container-name · JS

4 · container-type · normal

5 · container-type · size

6 · container-type · inline-size

7 · container-type · JS