CSS
Baseline ReadyA practical reference for deciding whether a CSS feature is ready to ship today.
- Widely available236features
- Newly available57features
- Limited support118features
Widely available
Widely availableoutline
The outline CSS shorthand sets the color, style, and width of a line around an element, outside of the border.
prefers-color-scheme media query
The prefers-color-scheme CSS media query sets styles based on the requested color scheme, light or dark.
prefers-reduced-motion media query
The prefers-reduced-motion CSS media query sets styles based on whether the user prefers to minimize the amount of non-essential animations on the device, such as scrolling, panning, zooming, and strobing.
2D transforms
The transform CSS property and its 2D transform functions allow rotating, scaling, skewing, and translating an element. Arbitrary 2D transforms are also possible using a transformation matrix.
3D transforms
The transform CSS property and its 3D transform functions allow rotations and other transforms in three dimensions, including perspective transforms.
animation-composition
The animation-composition CSS property chooses how to combine animations that affect the same property.
Animations (CSS)
The animation CSS property animates an element's style over time, using keyframes described in @keyframes rules.
cubic-bezier() easing
The cubic-bezier() CSS easing function interpolates along a smooth curve, creating animations and transitions with continuous changes in speed. The ease, ease-in, ease-out, and ease-in-out keyword values are presets for common Bézier curves.
Individual transform properties
The translate, rotate, and scale CSS properties apply single transformations independently, as opposed to applying multiple transformations with the transform CSS property.
steps() easing
The steps() CSS easing function divides an animation or transition into equidistant intervals, jumping from value to value. The step-start and step-end keyword values are presets with a single interval.
Transitions (CSS)
The transition shorthand CSS property sets how changes to an element's styles may occur over time. Transitions can be applied to specific CSS properties, all properties, or none.
background-color
The background-color CSS property sets the fill color of an element, behind any content and background images or gradients.
Color
The color CSS property sets the primary foreground color of an element, which is used for text, the default border color, and text decorations.
color-scheme
The color-scheme CSS property sets which color schemes (light or dark) an element uses and may prevent automatic dark mode adjustments by the browser.
color()
The color() function picks a color from a given color space. Wide gamut color spaces like display-p3 allow showing more vibrant and saturated colors than the standard srgb color space.
currentColor
The currentColor CSS value allows you to reuse an element's computed text color for other properties.
Gradients
The linear-gradient() and radial-gradient() CSS functions and their repeating counterparts create backgrounds that progress smoothly between multiple colors.
HSL
The hsl() and hsla() CSS functions pick colors using hue, saturation, lightness, and alpha (transparency) channels.
HWB
The hwb() CSS function picks colors using hue, whiteness, and blackness channels.
Lab and LCH
The CIE Lab color space expresses colors in terms of lightness and how red/green and blue/yellow a color is. LCH is a variant of Lab with polar coordinates. These color spaces can be used with the CSS color(), lab(), and lch() functions. Also known as CIELAB and CIELCH.
Named colors
Some CSS color values can be referenced by name, such as red or limegreen. They stand in for specific RGB color values.
Oklab and OkLCh
The Oklab color space expresses colors in terms of lightness and how red/green and blue/yellow a color is, aiming to match how humans perceive colors. OkLCh is a variant of Oklab with polar coordinates. These color spaces can be used with the CSS oklab() and oklch() functions.
RGB
The rgb(), rgba(), and hexadecimal (as in #004488ff) notations pick colors using red, green, blue, and alpha (transparency) channels.
System colors
The system color CSS keywords, such as ButtonBorder or LinkText, allow you to match default colors from the user agent.
Animatable clipping paths
The clip-path property can be animated using CSS transitions and animations.
background-blend-mode
The background-blend-mode CSS property blends an element's background image and background color using blend modes like multiply, difference, or color.
background-clip
The background-clip CSS property sets the extent of the background: the padding box, the content box, or the default border box.
background-origin
The background-origin CSS property sets the background starting position relative to the border and padding of an element.
Border images
The border-image CSS property draws an image around an element.
Borders
The border CSS property sets the color, style, and width of the line around an element.
Conic gradients
The conic-gradient() and repeating-conic-gradient() CSS functions create backgrounds that progress between two or more colors around a center point.
isolation
The isolation CSS property creates a new stacking context, which impacts z-index ordering and blend modes.
mask-type
The mask-type CSS property on an SVG <mask> element sets whether the mask is a luminance or alpha mask.
mix-blend-mode
The mix-blend-mode CSS property blends an element's content with its background or parent elements using blend modes like multiply, difference, or color.
shape-outside
The shape-outside CSS property, along with shape-margin and shape-image-threshold, sets the shape around which adjacent content will wrap.
shapes
The circle(), ellipse(), inset(), and polygon() CSS shape functions create shapes for use with clip-path and shape-outside.
:indeterminate
The :indeterminate CSS pseudo-class selects any form element whose state is indeterminate, such as checkboxes that have been set to an indeterminate state with JavaScript, or radio buttons which are members of a group in which all radio buttons are unchecked.
:read-only and :read-write
The :read-only and :read-write CSS pseudo-classes match elements that are read-only or read-write, respectively. For example, :read-only matches <input> and <textarea> elements with the readonly attribute.
Input selectors
The :checked, :disabled, and :enabled CSS pseudo-classes match form elements based on their state.
overscroll-behavior
The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.
Scroll snap
CSS scroll snap controls the panning and scrolling behavior within a scroll container.
scroll-behavior
The scroll-behavior CSS property controls whether scrolling is smooth or snaps, for scroll actions not performed by the user such as those triggered by navigation.
Logical properties
CSS logical properties control borders, size, margin, and padding with directions and dimensions relative to the writing mode. For example, in a left to right, top to bottom writing mode, block-end refers to the bottom. Also known as flow relative.
Absolute positioning
The position: absolute CSS declaration removes an element from the normal flow and positions it relative to its containing block, which is often the root element, or closest positioned ancestor.
aspect-ratio
The aspect-ratio CSS property controls the width-to-height ratio of elements. For <img> and <video> elements, the width and height attributes used together with height: auto control the aspect ratio while the image/video is loading.
box-sizing
The box-sizing CSS property sets whether an element's width and height are calculated based on the content-box, which does not count the size of borders or padding, or border-box, which does count them.
column-fill
The column-fill CSS property sets the distribution of content across columns in a multi-column layout.
column-span
The column-span CSS property controls whether a child element extends across all columns of a multi-column parent.
contain-intrinsic-size
The contain-intrinsic-size CSS property sets the intrinsic size of an element. When using size containment, the browser will lay out the element as if it had a single child of this size.
Display
The display CSS property sets the display behavior of an element's box within its layout and sets the layout behavior for its child elements.
display: flow-root
The display: flow-root CSS declaration sets an element as the root element of a new flow layout for its children, preventing margin collapse with sibling elements.
display: list-item
The display: list-item CSS declaration renders an element with the box layout of a <li> HTML element.
display: table
The display: table CSS declaration renders an element with the box layout of a <table> HTML element. Child elements may use equivalents to <table> internal elements such as display: table-row for <tr>.
fit-content
The fit-content CSS keyword expands a box as needed to fit its contents until the maximum size is reached, preserving the content's preferred aspect ratio.
Fixed positioning
The position: fixed CSS declaration removes an element from the normal flow and positions it relative to the viewport or page.
Flexbox
Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.
Flexbox gap
The gap CSS property in a flexbox layout sets the size of the space between items.
Grid
CSS grid is a two-dimensional layout system, which lays content out in rows and columns.
Grid animation
Grid animation allows you to animate the grid-template-columns and grid-template-rows CSS properties.
image-rendering
The image-rendering CSS property sets how images are scaled, retaining smoothness for photos, or hard edges for pixel art and QR codes.
Inline-size containment
The contain: inline-size CSS declaration prevents the element's inline dimension from being set by the element's contents. This permits the browser to avoid slower layout calculations.
Layout containment
The contain: layout CSS declaration isolates the inside of an element such that it cannot affect the layout of the rest of the page or be affected by the rest of the page. This permits the browser to avoid slower layout calculations.
margin
The margin CSS property sets space around an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.
Min and max width and height
The min-width, min-height, max-width, and max-height CSS properties set the minimum and maximum size of an element.
min-content and max-content
The min-content and max-content CSS keywords represent the smallest and largest intrinsic sizes of an element.
Multi-column layout
Multi-column layout flows an element's content across one or more columns in a single row, without affecting the display property of its children.
Overflow media queries
The overflow-block and overflow-inline CSS media queries set styles based on the way a device displays content that's larger than the viewport or page area. For example, a laptop lets users scroll to reveal content, while a printer displays overflowing content on additional pages.
padding
The padding CSS property sets space between an element's edge and its contents. It is a shorthand for padding-top, padding-right, padding-bottom, and padding-left.
Page breaks
In printed page layouts, the break-after, break-before, break-inside CSS properties control where printed pages start and end. Also known as pagination or page breaking.
Paint containment
The contain: paint CSS declaration prevents an element's descendants from being drawn outside the boundaries of the containing element, with any overflow clipped. This permits the browser to avoid slower painting calculations.
Position
The position CSS property sets the origin position of an element to an element, the element's scrollport, or the viewport.
Relative positioning
The position: relative CSS declaration offsets the position of an element relative to its position in the normal flow.
Size containment
The contain: size CSS declaration sets an element's dimensions exclusively by its height and width properties, ignoring its contents and descendants. This permits the browser to avoid slower layout calculations.
Static positioning
The position: static CSS declaration positions an element in the normal flow. A statically positioned element ignores physical and logical properties such as top or inset-block-start.
Sticky positioning
The position: sticky CSS declaration positions an element in the normal flow until it crosses a specified threshold, at which points it becomes fixed (stuck) at that position.
Style containment
The contain: style CSS declaration permits the browser to avoid slower layout calculations by preventing modification to counter (counter-increment and counter-set) and quotation styles (content property quote values) beyond the element's descendants.
Subgrid
The subgrid value for the grid-template-columns and grid-template-rows properties allows a grid item to inherit the grid definition of its parent grid container.
Width and height
The width and height CSS properties set the preferred physical size of an element.
object-fit
The object-fit CSS property sets how images, videos, and other replaced elements are scaled within their container.
@supports (compatibility prefix)
The @supports (-webkit-transform-3d) CSS media query is a standardized compatibility alternative to @supports (transform-style).
color-gamut media query
The color-gamut media query sets styles based on the colors a device can display.
dynamic-range media query
The dynamic-range CSS media query sets styles based on whether a device can display at least standard range colors or at least high range colors. Non-visual devices will match neither.
Interaction media queries
The pointer, any-pointer, hover, and any-hover CSS media queries set styles based on the presence of pointing devices and their ability to hover over elements. For example, most smartphones match the (hover: none) and (pointer: coarse) media query.
Media queries
The @media CSS rule conditionally applies styles based on the output device type, its capabilities, and the user's preferences. Media queries are composed of an optional media type such as screen or print, and one or more mandatory media features, such as prefers-reduced-animations.
Media query range syntax
The range syntax of CSS media queries allows you to use mathematical comparison operators such as <, >, <=, and >= to define a range of values for a media query. For example, (400px < width < 1000px) returns true if the viewport width is between 400px and 1000px.
prefers-contrast media query
The prefers-contrast CSS media query sets styles based on whether the user prefers more or less contrast, the difference between foreground and background colors.
resolution media query
The resolution CSS media query sets styles based on the pixel density, or how many pixels a device uses to display a single CSS pixel.
resolution media query (compatibility prefixes)
The -webkit-device-pixel-ratio, -webkit-min-device-pixel-ratio, and -webkit-max-device-pixel-ratio CSS media queries are standardized compatibility alternatives to resolution media queries.
Update frequency media query
The update CSS media query sets styles based on whether and how fast the user's device can modify display after it has been rendered. For example, you can avoid animations on devices that aren't fast enough to display them smoothly.
::before and ::after
The ::before and ::after CSS pseudo-elements select inline boxes preceding and following an element. They are often used with the content property to generate cosmetic content.
object-position
The object-position CSS property places images, videos, and other replaced elements within their boxes.
Outlines
The outline-color, outline-style, and outline-width and outline-offset CSS properties style a line around an element, outside of the border.
Small, large, and dynamic viewport units
The sv*, lv*, and dv* CSS viewport units are relative to the smallest, largest, and current (dynamic) viewport size. They are used to size elements in relation to the viewport's dimensions.
System font
The font-family: system-ui CSS declaration uses the operating system default font for text.
text-decoration
The text-decoration CSS property sets the style and color of decorative lines including underline, overline, line-through, or a combination of lines.
text-decoration-skip-ink
The text-decoration-skip-ink CSS property sets whether underlines and overlines may be interrupted where the line would cross a glyph.
text-emphasis
The text-emphasis CSS property sets position and style for text emphasis marks, especially for East Asian languages.
touch-action
The touch-action CSS property sets whether an element on a touch screen can be panned or pinched to zoom.
contain
The contain CSS property sets limits to the scope of styles, layout, and paint rendering for speed and efficiency. The none keyword value disables containment, strict is equivalent to contain: size layout style paint, and content is equivalent to contain: layout style paint.
Container queries
Container size queries with the @container at-rule apply styles to an element based on the dimensions of its container.
::backdrop
The ::backdrop CSS pseudo-element is a box underneath an element in the top layer, such as a <dialog>. It can be used to create obscuring effects distinguishing a modal element from the elements underneath.
::file-selector-button
The ::file-selector-button CSS pseudo-element selects the button of a <input type="file"> element.
::first-letter
The ::first-letter CSS pseudo-element selects the first letter in an element for styling.
::first-line
The ::first-line CSS pseudo-element selects the first line of text in an element for styling.
::placeholder
The ::placeholder CSS pseudo-element selects help text in <input> and <textarea> elements when no value is set.
:default
The :default CSS pseudo-class matches the default element in a group of related form controls, such as checkboxes and radio buttons with the checked attribute.
:empty
The :empty CSS pseudo-class matches elements without child elements.
:focus-visible
The :focus-visible CSS pseudo-class selects elements that match the :focus pseudo-class and meets the browser's criteria for visually emphasizing focused elements.
:focus-within
The :focus-within CSS pseudo-class matches an element if the element or any of its children are focused.
:is()
The :is() CSS functional pseudo-class takes a selector list as its argument, and matches any element that can be selected by one of the selectors in that list.
:lang()
The :lang() CSS functional pseudo-class matches elements based on their content language.
:modal
The :modal pseudo-class selects elements that put other elements into a non-interactive state, such as a fullscreen element or a <dialog> element used with showModal().
:not()
The :not() functional pseudo-class matches elements that do not match the selectors in its argument.
:nth-child()
The :nth-child() and :nth-last-child() CSS functional pseudo-classes match elements based on their index within a list of elements. The :first-child and :last-child pseudo-classes match the first and last element in a list, and the :only-child pseudo-class matches an element with no siblings.
:nth-child() of <selector>
The of syntax for the :nth-child() and :nth-last-child() CSS functional pseudo-classes match elements by the relative position of elements, counted from the first or last sibling matching a selector list.
:nth-of-type() pseudo-classes
The :nth-of-type() and :nth-last-of-type() CSS functional pseudo-classes match elements based on their position among siblings of the same type. The :first-of-type, :last-of-type, and :only-of-type pseudo-classes match the first, last, and only elements of its type.
:placeholder-shown
The :placeholder-shown CSS pseudo-element selects <input> and <textarea> elements when no value is set and the element's placeholder attribute is not empty. Not to be confused with ::placeholder, which selects the placeholder text itself.
:root
The :root pseudo-class matches the root element of the document, usually the <html> element.
:scope (pseudo-class)
The :scope CSS pseudo-class matches the scoping root, for instance the element that querySelector() is called on, or the root of a DOM subtree specified with @scope.
:target
The :target CSS pseudo-class matches the element with an ID matching the URL fragment.
:where()
The :where() CSS functional pseudo-class takes a selector list as its argument, and matches any element that can be selected by one of the selectors in that list. It is functionally equivalent to the selectors in the list, but doesn't affect the CSS rule specificity.
Case-insensitive attribute selector
The i identifier in a CSS attribute selector matches attribute values case-insensitively in document languages like XML where attribute values are case-sensitive.
Form validity pseudo-classes
The form validity CSS pseudo-classes match <form> elements based on the constraints of a form field, such as validity (:valid, :invalid, :in-range, :out-of-range) and necessity (:optional or :required).
Host
The :host CSS pseudo-class selects the containing element of the shadow tree in which it is used. The :host() CSS pseudo-class selects the that element only if it matches the provided selector.
Link selectors
The :link CSS pseudo-class matches unvisited links, :visited matches visited links, and :any-link matches both.
Selectors (core)
CSS selectors match elements based on their type, attributes, and relationship to other elements. They define the specific elements to which a block of styles will be applied. This feature represents the oldest selectors of CSS.
Shadow parts
The part and exportparts HTML attributes expose elements of a shadow DOM as named parts, which can be selected by the ::part() CSS pseudo-element for styling.
User action pseudo-classes
The :active, :focus, and :hover CSS pseudo-classes match elements based on how users are interacting with them.
Opacity (SVG)
The fill-opacity, and stroke-opacity SVG attributes and CSS properties control the transparency of a stroke or fill of an SVG element.
SVG
The SVG image format, represented by the <svg> element, creates two-dimensional vector graphics with declarative or scripted interaction and animation.
SVG filters
The <filter> SVG element applies custom effects such as color manipulation, blurring, or morphing to SVG elements.
@charset
The @charset CSS at-rule specifies the character encoding of an external style sheet.
@import
The @import CSS at-rule loads styles from another stylesheet.
@namespace
The @namespace CSS rule sets a default namespace or namespace prefix. Namespace prefixes allow CSS selectors to distinguish elements with the same name but different document types, such as the HTML <a> element and the SVG <a> element.
@supports
The @supports at-rule applies styles based on a browser's support for CSS features, such as a CSS property and value. Also known as feature queries.
all
The all CSS property is a shorthand for all CSS properties, except for direction and unicode-bidi. It accepts only the keywords for explicit defaulting (such as initial and inherit), since they are the only values supported on all CSS properties.
appearance
The appearance CSS property controls the appearance of form controls. Using appearance: none disables any default native appearance and allows the elements to be styled with CSS.
attr() (content only)
The attr() CSS function, in content property declarations, sets a ::before or ::after pseudo-element's content to the value of the specified HTML attribute.
caret-color
The caret-color CSS property sets the color of the text insertion pointer in a text input.
Cascade layers
The @layer CSS at-rule avoids specificity conflicts by providing priority levels for different groups of CSS rules, such as low-priority styles like resets, and high-priority styles like UI components.
color-mix()
The color-mix() function mixes two colors in a given color space and by a given amount. Commonly, lighter or darker variations of a color are created by mixing with white or black.
Content
The content CSS property sets the content inside of an element or pseudo-element, replacing the current value. It's often used with the ::before and ::after pseudo-elements to generate cosmetic content.
Custom properties
Custom properties are CSS properties prefixed with -- that set values you can reuse with the var() function. For example, you can set a --key-color property to reuse as border-color: var(--key-color). Also known as CSS variables.
float and clear
The float CSS property aligns an element to either side of its container, allowing text and inline elements to flow around it. The clear CSS property sets whether an element is moved below floating elements that proceed it.
Forced colors
The forced-colors CSS @media rule detects when a user has chosen to use a forced colors mode, also known as high-contrast mode, and the forced-color-adjust CSS property sets whether forced colors apply to an element.
Hyphenation
The hyphens CSS property controls when long words are broken by line wrapping. Although called hyphens, the property applies to word-splitting behavior across languages, such as customary spelling changes or the use of other characters. Support for non-English languages varies significantly.
image-set()
The image-set() CSS function provides a set of images at different resolutions or pixel densities, which the browser can pick from, depending on the device capabilities.
inherit
The inherit keyword resets any CSS property to the computed value of that property from the parent element.
initial
The initial keyword resets any CSS property to its initial value as defined by the specification. For example, the initial value of the display property is inline, regardless of the element being styled. Not to be confused with revert, which resets to the user or browser default style.
Layout direction override
The unicode-bidi and direction CSS properties override the Unicode layout algorithm. They are intended for Document Type Definition (DTD) designers. For HTML documents, you should use the dir global HTML attribute and <bdo> HTML element instead.
min(), max(), and clamp()
The min() and max() CSS functions return the minimum or maximum of the arguments, while clamp() clamps a value to a given range.
Motion path
The offset CSS property animates an element along a defined motion path.
overflow
The overflow CSS property sets the behavior for when content doesn't fit in an element.
overflow: clip
The overflow: clip CSS declaration clips an element's overflowing content to the box that's defined by the overflow-clip-margin property. Unlike overflow: hidden, it allows you to hide overflow on one axis while keeping overflow on the other axis visible.
Physical properties
The physical CSS properties, top, right, bottom, and left, set the inset position of an element relative to the corresponding side of a container determined by the element's position property.
pointer-events
The pointer-events CSS property sets whether a user can interact with an element using a mouse, touch, or other pointing input device.
Quotes
The quotes CSS property sets the quotation marks inserted via the content CSS property or <q> element.
revert
The revert CSS keyword resets any property to its previous default, provided by either the user or browser stylesheets. For example, setting display: revert on a <div> will likely result in display: block, the browser default style. This is often confused with initial.
Safe area inset environment variables
The safe-area-inset- CSS environment variables represent a rectangle that cannot cut off content within a non-rectangular screen. For example, top:\ env(safe-area-inset-top); positions the top of an element below the notch on an iPhone.
sin(), cos(), tan(), asin(), acos(), atan(), and atan2() (CSS)
The sin(), cos(), tan(), asin(), acos(), atan(), and atan2() CSS functions compute various trigonometric functions.
Text overflow
The text-overflow CSS property sets how hidden overflow content appears to users. The property can clip content, truncate content with an ellipsis (…), or truncate with a custom string.
Text stroke and fill (compatibility prefixes)
The -webkit-text-stroke-width and -webkit-text-stroke-color CSS properties set the thickness and color of text outlines. The -webkit-text-fill-color sets the color within text character outlines. Both default to the text color.
text-indent
The text-indent CSS property sets the size of the empty space (indentation) at the beginning of lines in a text.
Two-value display property
The display CSS property accepts multiple keyword values, such as inline flex or block flow, to explicitly set an element's inner and outer layout mode. Also known as 2-value, multi-keyword, or multiple value syntax.
unset
The unset keyword resets any CSS property, removing any values previously set by the author, user, or browser. Inherited properties (like color) reset to the parent element's computed value. Non-inherited properties (like display) reset to the specified initial value (inline).
vertical-align
The vertical-align CSS property sets the vertical alignment of inline, inline-block, and table cell elements. It has no effect on block-level elements.
visibility
The visibility CSS property sets whether an element is shown. Invisible elements still affect the document layout.
will-change
The will-change CSS property gives hints to the browser about expected changes to an element's scroll position, contents, or style. These hints allow browsers to optimize for upcoming style changes.
z-index
The z-index CSS property orders overlapping elements, with higher values appearing in front of or on top of lower values.
@counter-style
The @counter-style CSS at-rule sets custom counter styles for list items. For example, you can use a sequence of specific symbols instead of numbers for an ordered list.
@font-face
The @font-face CSS at-rule creates a custom font-family value. The at-rule's descriptors set the font's name, source, and various display settings.
COLRv0
COLRv0 is a font format that supports multi-color glyphs. COLRv0 supports only solid colors.
Counters (CSS)
The counter-reset and counter-increment CSS properties and the counter() and counters() functions automatically number headings or ordered list items.
dominant-baseline
The dominant-baseline CSS property sets the specific baseline used to align an elements's text and inline-level contents.
Font shorthand
The font CSS property shorthand sets multiple font properties, including style, weight, size, and font family.
font-display
The font-display CSS descriptor sets whether to show a substitute font or nothing while a font face loads. The property manages what's known as a flash of unstyled text or flash of invisible text.
font-family
The font-family CSS property sets the desired font face for text, along with optional fallback font faces.
font-feature-settings
The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.
font-kerning
The font-kerning CSS property sets whether kerning data from a font is used to adjust the space between letters.
font-optical-sizing
The font-optical-sizing CSS property sets whether text rendering is optimized for viewing at different sizes.
font-palette
The font-palette CSS property selects a color palette from the font, optionally overriding individual colors in the @font-palette-values at-rule.
font-size
The font-size CSS property sets the text height.
font-stretch
The font-stretch CSS property selects a font face from a font family based on width, either by a keyword such as condensed or a percentage.
font-style
The font-style CSS property sets the text style, with normal, italic, and oblique options.
font-synthesis
The font-synthesis CSS shorthand property disables all font synthesis except the given kinds. To disable a specific kind of font synthesis, instead use the longhand properties such as font-synthesis-style and font-synthesis-weight.
font-synthesis-small-caps
The font-synthesis-small-caps CSS property sets whether or not the browser should synthesize small caps typefaces when they're missing from the font.
font-synthesis-style
The font-synthesis-style CSS property sets whether or not the browser should synthesize italic and oblique typefaces when they're missing from the font.
font-synthesis-weight
The font-synthesis-weight CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font.
font-variant
The font-variant CSS property is a shorthand for font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-emoji, font-variant-ligatures, font-variant-numeric, and font-variant-position.
font-variant-alternates
The font-variant-alternates CSS property, along with the @font-feature-values at-rule, chooses when to use a font's alternate glyphs.
font-variant-caps
The font-variant-caps CSS property sets whether text should be displayed in small caps, petite caps, or with capital letters designed for titles.
font-variant-east-asian
The font-variant-east-asian CSS property controls glyph substitution and sizing in East Asian text.
font-variant-ligatures
The font-variant-ligatures CSS property sets how characters can be visually combined for readability or stylistic reasons.
font-variant-numeric
The font-variant-numeric CSS property sets how numeric characters are displayed. For example, you can align columns of numbers or use zeroes that have a slash.
font-variation-settings
The font-variation-settings CSS property sets an "axis of variability" on a variable font, such as weight, optical size, or a custom axis defined by the typeface designer. When possible, use other CSS font properties, such as font-weight: bold. Also known as variable fonts.
font-weight
The font-weight CSS property controls the thickness of a font. It is set explicitly with the keyword bold or a number, or relative to the inherited thickness with the keywords bolder or lighter.
Hyphenate character
The hyphenate-character CSS property sets the character or string to use at the end of a line before a line break.
letter-spacing
The letter-spacing CSS property controls the amount of space between each letter in an element or block of text.
line-break
The line-break CSS property sets how strictly to apply rules for wrapping text to new lines, especially for symbols and punctuation.
line-height
The line-height CSS property sets the spacing between text baselines, oriented to the horizontal or vertical writing mode.
List style
The list-style shorthand CSS property and the list-style-image, list-style-position, and list-style-type longhand properties set the position and appearance of a list item's marker.
overflow-wrap
The overflow-wrap CSS property breaks a line of text onto multiple lines inside the targeted element in an otherwise unbreakable place to prevent overflow. The legacy property is word-wrap.
tab-size
The tab-size CSS property sets the width of the tab character.
text-align
The text-align CSS property sets the horizontal placement of the inner content of a block element.
text-align-last
The text-align-last CSS property sets the alignment of the last line of text before a forced line break.
text-combine-upright
The text-combine-upright CSS property displays multiple characters in the space of a single character in vertical text. This is used in East Asian documents to display Latin-based strings such as components of a date or letters of an initialism.
text-orientation
The text-orientation CSS property sets the how text is typeset within a line when the writing mode is vertical.
text-shadow
The text-shadow CSS property sets the position and styles of shadow on text.
text-transform
The text-transform CSS property sets text case and capitalization.
text-underline-offset
The text-underline-offset CSS property shifts underlines on text from the initial position by a given distance. The initial position is affected by the text-underline-position property.
text-underline-position
The text-underline-position CSS property sets the position of underlines on text. For example, text-underline-position: under places the underline below the text, avoiding crossing descenders. The underline may be further adjusted by the text-underline-offset property.
white-space
The white-space CSS property sets how white space is collapsed and how lines wrap. It is a shorthand for white-space-collapse and text-wrap-mode.
word-break
The word-break CSS property sets how lines break within words.
word-spacing
The word-spacing CSS property sets the amount of white space between words.
writing-mode
The writing-mode CSS property sets whether text is laid out horizontally or vertically, and left to right, or right to left.
calc()
The calc() CSS function computes mathematical expressions such a calc(100%/3 - 1em).
calc() keywords
The e, pi, infinity, and NaN keywords represent well-defined constants accepted in CSS math functions such as calc().
ch unit
The ch CSS length unit is a font-relative length based on the width of the zero (0) character.
em unit
The em CSS length unit is a font-relative length equal to the specified font size. In an element with a 2 inch font, 1em equals 2 inches.
ex unit
The ex CSS length unit is a font-relative length equal to the used x-height of the first available font. X-height is often equal to the height of the lowercase x.
ic unit
The ic CSS length unit corresponds to the width of CJK ideographic characters.
image-orientation
The image-orientation CSS property corrects the rotation of an image using the image's metadata, such as EXIF.
Q unit
The Q CSS length unit is an absolute length anchored to the physical measurement of quarter-millimeters. 1Q is equivalent to 1/40 of 1 centimeter.
rem
The rem CSS length unit is a font-relative length that is equal to the font size of the root HTML element which for most browsers is 16px.
Viewport units
The vw, vh, vmin, and vmax CSS viewport units are relative to the size of the viewport, and are used to size elements in relation to the viewport's dimensions.
background
The background CSS property is a shorthand that sets several background properties at once.
background-image
The background-image CSS property sets the graphics to display behind the content of an element and in front of the background color. Graphics may be any combination of images or gradients.
background-position
The background-position CSS property offsets the initial position of background images relative to the background origin.
background-repeat
The background-repeat CSS property sets how a background image is tiled.
background-size
The background-size CSS property scales or stretches a background based on the size of the element (with the contain and cover keywords), a length, or percentage.
border-radius
The border-radius CSS property rounds the corners of the border drawn around an element.
box-shadow
The box-shadow CSS property applies shadow effects around an element's frame. This can create drop shadow and inner shadow effects.
clip-path
The clip-path CSS property and SVG attribute set the visible area of an element. Everything outside the area will be hidden.
filter
The filter CSS property applies one or more graphic effects to an element. You can use filter functions, such as blur() and drop-shadow(), alone or combined to produce different effects. For instance, filter: blur(2px).
opacity
The opacity CSS property sets the transparency of an element.
Autonomous custom elements
Autonomous custom elements are HTML elements with a hyphenated tag name (like <example-element>) that have behaviors you define.
Available with conditions
Newly availableActive view transition
The :active-view-transition CSS pseudo-class matches the root element when a view transition is active. The :active-view-transition-type() CSS pseudo-class matches only when the active view transition was started with the specified type.
transition-behavior
The transition-behavior: allow-discrete CSS declaration allows transitions for properties whose animation behavior is discrete. Such properties can't be interpolated and swap from their start value to the end value at 50%.
View transitions
View transitions allow you to create animated visual transitions between different states of a document.
view-transition-class
The view-transition-class CSS property sets a name that can be used to apply styles to multiple named view transition pseudo-elements.
Clip path boxes
The fill-box, stroke-box, and view-box values for clip-path set an edge of the element's box to use as the clipping shape.
Gradient interpolation
Gradient interpolation controls how the colors between gradient stops are calculated in CSS. For example, linear-gradient(to right in oklch longer hue, red, red); calculates in the oklch color space, with the hue going all the way around the hue circle from red back to red.
Masks
The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.
rect() and xywh()
The rect() CSS function creates a rectangle shape with insets from the edges of an element. The xywh() CSS function creates a rectangle shifted by an x and y distance. They can be used with clip-path and shape-outside.
shape()
The shape() CSS function creates shapes with a series of commands like line, move, and curve. It can be used with clip-path and shape-outside.
align-content in block layouts
The align-content property vertically aligns content in block layouts, like it does in flex or grid layouts.
Page setup
The @page CSS at-rule sets the page-specific dimensions and margins for content such as printed documents, ebooks, or slides.
print-color-adjust
The print-color-adjust CSS property sets whether styles of printed pages should be adjusted to use less ink, in cases such as light text on a dark background.
scripting media query
The scripting CSS media query sets styles based on whether scripting such as JavaScript is available. Values are enabled if scripting is available, initial-only if scripting is only available on page load (for example, printed content), or none.
Math font family
The font-family: math CSS declaration uses the browser default font face for displaying mathematical expressions.
Registered custom properties
The CSS.registerProperty() static method and the @property CSS at-rule register custom properties for which types and behaviors can be defined.
Spelling and grammar text decorations
The text-decoration-line: spelling-error and text-decoration-line: grammar-error CSS declarations apply the browser's marking for spelling and grammatical mistakes. This is typically a wavy underline in red or green.
transform-box
The transform-box CSS property sets the position and dimensions of the reference box relative to which an element's transformations are calculated.
zoom
The zoom CSS property scales the size of an element. Unlike the transform property, a zoomed element affects page layout.
scrollbar-color
The scrollbar-color CSS property sets the color of the scrollbar track and thumb.
scrollbar-gutter
The scrollbar-gutter CSS property reserves space for the scrollbar, preventing unwanted layout changes as the scrollbar appears and disappears.
scrollbar-width
The scrollbar-width CSS property sets the width of the scrollbar.
::details-content
The ::details-content pseudo-element selects the expandable content of a <details> element, excluding the <summary>.
:dir()
The :dir() CSS functional pseudo-class matches elements by text direction, either right to left (rtl) or left to right (ltr).
:has()
The :has() CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.
:user-valid and :user-invalid
The :user-valid and :user-invalid pseudo-classes match form controls that have been marked as valid or invalid based on their validation constraints.
@scope
The @scope CSS at-rule sets the scope for a group of rules.
@starting-style
The @starting-style CSS at-rule sets the starting values for properties that are transitioning when the target element's style is first updated.
abs() and sign()
The abs() and sign() CSS functions compute the absolute value or the sign of the input.
Alt text for generated content
The / notation in content CSS property values adds alternative text to generated content. For example, the content: url('upvote-icon.svg') / 'Upvote' declaration adds accessible 'Upvote' text to the SVG icon. Also known as alternate text.
backdrop-filter
The backdrop-filter CSS property applies graphical effects such as blurring or color shifting to the area behind an element.
content-visibility
The content-visibility CSS property delays rendering an element, including layout and painting, until it is needed.
light-dark()
The light-dark() CSS function accepts two colors and uses one depending on the current color scheme.
linear() easing
The linear() easing function for animations and transitions interpolates linearly between the control points, and can be used to approximate complex easing functions, such as a bounce effect.
Nesting
CSS nesting allows for shorter selectors, easier reading, and more modularity by nesting rules inside others.
paint-order
The paint-order CSS property sets the z-order of strokes, fills, and (in SVG content) markers. For example, paint-order: markers stroke fill; draws the markers, then stroke on top of markers, then fill on top of both markers and stroke.
pow(), sqrt(), hypot(), log(), and exp()
The pow(), sqrt(), hypot(), log(), and exp() CSS functions compute various exponential functions.
Relative colors
The from keyword for color functions (color(), hsl(), oklch(), etc.) creates a new color based on a given color by modifying the values of the input color. Also known as relative color syntax (RCS).
round(), mod(), and rem()
The round(), mod(), and rem() CSS functions compute rounded values and the remainder after division.
Vertical form controls
The writing-mode CSS property orients form elements (such as radio buttons, progress bars, or select menus) vertically when the writing mode is vertical-lr or vertical-rl. The direction CSS property sets whether inputs flow from top to bottom or bottom to top.
::target-text
The ::target-text pseudo-element allows you to style text highlighted by a URL text fragment such as #:~:text=snippet.
counter-set
The counter-set CSS property creates (and optionally sets a value for) a counter, the numbers for a series of headings or ordered list items.
font-size-adjust
The font-size-adjust CSS property preserves apparent text size, regardless of the font used, by scaling fonts to the same size with respect to a specific metric, such as x-height. This can help make fallback fonts look the same size.
ruby-align
The ruby-align CSS property sets the spacing and alignment of ruby annotation text when it does not fill its available space.
ruby-position
The ruby-position CSS property sets the position of a ruby annotation in relation to its base text. Annotations can display over, under, or interleaved with the base text.
text-indent: each-line
The text-indent: each-line CSS declaration indents text after forced breaks as well as to the first line of a block.
text-indent: hanging
The text-indent: hanging CSS declaration indents all lines except the first.
text-wrap
The text-wrap CSS property sets how lines break in text that overflows the container. It is a shorthand for text-wrap-style and text-wrap-mode.
text-wrap: balance
The text-wrap: balance CSS declaration balances the length of each line when text is broken into multiple lines. Also known as headline balancing.
white-space-collapse
The white-space-collapse CSS property sets whether new line characters are shown as line breaks, and whether multiple consecutive spaces are all displayed or combined.
cap unit
The cap CSS length unit corresponds to the height of Latin capital letters.
lh unit
The lh CSS length unit corresponds to the requested line height, the computed value of the line-height property. Some lines may be higher than this based on their content.
rcap unit
The rcap CSS length unit is a font-relative length equal to the value of the cap unit on the root element. Cap-height is approximately equal to the height of a capital Latin letter.
rch unit
The rch CSS length unit is a font-relative length equal to the value of the ch unit on the root element. ch length is based on the width of the zero (0) character.
rex unit
The rex CSS length unit is a font-relative length that is equal to the x-height of the root element.
ric unit
The ric CSS length unit, or root international character, is a font-relative length equal to the width of CJK character relative to the root element.
rlh unit
The rlh CSS length unit is a font-relative length relative to the line height of root element.
:state()
The :state() CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states API.