CSS at-rules
At-rules are CSS statements that instruct CSS how to behave. They are used to group and structure style rules and other at-rules, declare style information not directly associated with selected content, and manage syntactic constructs such as imports and namespaces keyword mappings. They begin with an at-sign, @ (U+0040 COMMERCIAL AT), followed by an identifier.
Index of at-rules and at-rule descriptors
@charset@color-profile@container-
@counter-style @custom-media-
@documentNon-standard Deprecated -
@font-face -
@font-feature-values -
@font-palette-values -
@functionExperimental @import@keyframes@layer-
@media(see list of media features in the next section) @namespace-
@page @position-try-
@property @scope@starting-style@supports@view-transition
Index of media features
-moz-device-pixel-ratio-webkit-animation-webkit-device-pixel-ratio-webkit-transform-2d-webkit-transform-3d-webkit-transitionany-hoverany-pointeraspect-ratiocolorcolor-gamutcolor-indexdevice-aspect-ratiodevice-heightdisplay-modedynamic-rangeforced-colorsgridheighthorizontal-viewport-segmentshoverinverted-colorsmonochromeorientationoverflow-blockoverflow-inlinepointerprefers-color-schemeprefers-contrastprefers-reduced-dataprefers-reduced-motionprefers-reduced-transparencyresolutionscanscriptingshapeupdatevertical-viewport-segmentsvideo-dynamic-rangewidth
Specifications
| Specification |
|---|
| CSS Syntax Module Level 3 |
See also
- CSS at-rule functions
- Nesting at-rules
- CSS syntax module
- CSS conditional rules module
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules