<overflow-position>
The <overflow-position>
enumerated value type defines how an alignment subject that is larger than its alignment container will overflow that container. For example, if centered items are wider than their container, the overflow may be displayed beyond the viewport's start edge, which can't be scrolled to. The <overflow-position>
value defines whether the alignment mode should be overridden to ensure the content is visible (safe
) or if the alignment mode must be adhered to (unsafe
).
This data type is valid for the align-content
, align-items
, align-self
, justify-items
and justify-self
properties as well as the place-content
, place-items
, and place-self
shorthand properties.
If omitted, the default overflow alignment is a blend of safe
and unsafe
.
Syntax
<overflow-position> = unsafe | safe
Values
The following keyword values are represented by the <overflow-position>
grammar term:
safe
-
If the size of the alignment subject overflows the alignment container, the alignment subject is instead aligned as if the alignment mode were
start
. unsafe
-
Regardless of the relative sizes of the alignment subject and alignment container, the given alignment value is honored.
Specifications
No specification found
No specification data found for css.types.overflow-position
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
No compatibility data found for css.types.overflow-position
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
See also
- Properties that use this data type:
align-content
,align-items
,align-self
,justify-content
justify-items
,justify-self
,place-content
,place-items
, andplace-self
- Other box alignment data types:
<content-distribution>
,<content-position>
,<baseline-position>
, and<self-position>
- CSS box alignment module
- CSS flexible box layout module
- CSS grid layout module