staticdata.dev
Menu
Datasets About Contact

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.

v1.0.0 MIT 20 records Updated 2026-10-05 stable Source:  MDN Web Docs — CSS At-Rules

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
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

    Open

    min: 4.8 KB · /v1/css-at-rules.min.json

  • CSV 4.1 KB

    /v1/css-at-rules.csv

    Open
  • TypeScript 5.4 KB

    /v1/css-at-rules.ts

    export const cssAtRules

    type CssAtRule = (typeof cssAtRules)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
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.

Data preview
namedescriptionmdnUrl
@charsetSpecifies 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-profileDefines 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
@containerApplies 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-styleDefines 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-faceSpecifies 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-valuesAllows 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-valuesAllows 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
@functionDefines 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
@importImports 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
@keyframesDefines 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

Showing 10 of 20. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/css-at-rules.json | jq '.[0]'
JavaScript
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]);
Python
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])
Go
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])
}
Rust
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