CSS At-Rules
20 top-level CSS at-rules curated from MDN Web Docs (as of October 2026), including conditional rules (@media, @supports, @container), font rules (@font-face, @font-feature-values), animation (@keyframes), cascade control (@layer, @import), printing (@page), and newer features like @property, @scope, @starting-style, @view-transition, and @function.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/css-at-rules.json
Or use as a typed import:
import { cssAtRules } from "https://staticdata.dev/v1/css-at-rules.ts"
Formats
- JSON 5.2 KB
/v1/css-at-rules.json
min: 4.8 KB · /v1/css-at-rules.min.json
- CSV 4.1 KB
/v1/css-at-rules.csv
- TypeScript 5.4 KB
/v1/css-at-rules.ts
export const cssAtRules
type CssAtRule = (typeof cssAtRules)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | CSS at-rule name including the @ symbol | @media |
| description | string | Short explanation of the at-rule's purpose | Applies styles conditionally based on media queries. |
| mdnUrl | string | Link to the MDN Web Docs reference page for this at-rule | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media |
Preview
First 10 records.
| name | description | mdnUrl |
|---|---|---|
| @charset | Specifies the character encoding used in the style sheet. It must be the first statement in the sheet and cannot be preceded by any character. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@charset |
| @color-profile | Defines a color profile which can then be used in the color() function to specify a color. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@color-profile |
| @container | Applies styles to elements based on the size or style of a containing element, enabling container queries. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@container |
| @counter-style | Defines a custom counter style that can be used with list-style and counter() functions. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@counter-style |
| @font-face | Specifies a custom font to be loaded from a remote or local source, making it available for use in the document. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-face |
| @font-feature-values | Allows authors to use a common name for font features activated differently in OpenType, simplifying CSS when using multiple fonts. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-feature-values |
| @font-palette-values | Allows customization of the default values of font-palette created by a font maker. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-palette-values |
| @function | Defines a CSS custom function that takes parameters and returns a value, callable in property values as --name(arguments). | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@function |
| @import | Imports style rules from another stylesheet. It must precede all other rules except @charset and @layer statements. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@import |
| @keyframes | Defines the intermediate steps in a CSS animation sequence by establishing keyframes along the animation timeline. | https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@keyframes |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/css-at-rules.json | jq '.[0]' import type { CssAtRule } from "https://staticdata.dev/v1/css-at-rules.ts";
const res = await fetch("https://staticdata.dev/v1/css-at-rules.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const cssAtRules: CssAtRule[] = await res.json();
console.log(cssAtRules[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/css-at-rules.min.json") as r:
cssAtRules = json.load(r)
print(cssAtRules[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/css-at-rules.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/css-at-rules.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
This dataset enumerates the 20 standard top-level CSS at-rules documented by MDN Web Docs as of October 2026. Nested descriptor-block at-rules (the @page margin rules such as @top-left, and the @font-feature-values blocks such as @swash and @styleset) are not listed separately. At-rules are CSS statements that instruct how CSS should behave; they begin with an @ sign followed by an identifier, and end either at the next semicolon or the next CSS block. Each record includes the at-rule name (with the @ prefix), a concise description of its purpose, and a direct link to the MDN reference page.
The list covers the full spectrum of standardized at-rules: structural rules like @import and @charset, conditional group rules like @media, @supports, and @container, font-related rules like @font-face, @font-feature-values, and @font-palette-values, animation control via @keyframes, cascade layering with @layer, and newer CSS features including @property (Houdini), @scope, @starting-style (entry transitions), @view-transition, @color-profile, @position-try, and @function (custom functions).
Deprecated or non-standard at-rules (such as @document/@-moz-document) are intentionally excluded. This dataset is useful for building CSS linters, documentation tools, code editors, or any application that needs programmatic knowledge of valid CSS at-rule identifiers and their semantics.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
css-at-rules changelog for this dataset's history.
Related datasets
More Code datasets
- ansi-colors
- ascii
- cron-presets
- css-functions
- css-pseudo-classes
- css-pseudo-elements
- data-units
- exit-codes
- file-signatures
- hash-algorithms
- js-array-methods
- js-math-methods
- js-object-methods
- js-string-methods
- json-schema-keywords
- jwt-claims
- mathematical-constants
- measurement-units
- node-builtin-modules
- owasp-top-10
- periodic-table
- physical-constants
- posix-signals
- programming-languages
- regex-flags
- regex-patterns
- roman-numerals
- si-base-units
- si-derived-units
- si-prefixes
- spdx-licenses
- strftime-tokens
- tailwind-colors
- time-units
- unicode-blocks
- unicode-general-categories
- unicode-planes
- unix-file-permissions
- xterm-256-colors