CSS Functions
124 CSS functions curated from MDN Web Docs and the CSS specifications (as of October 2026), including math functions (calc, clamp, min, max), color functions (rgb, hsl, lab, oklch, color-mix), transform functions (translate, rotate, scale, matrix), gradient functions (linear-gradient, radial-gradient, conic-gradient), filter functions (blur, brightness, contrast, drop-shadow), shape functions (circle, ellipse, polygon, path), and utility functions (var, env, attr, url).
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/css-functions.json
Or use as a typed import:
import { cssFunctions } from "https://staticdata.dev/v1/css-functions.ts"
Formats
- JSON 21.1 KB
/v1/css-functions.json
min: 18.2 KB · /v1/css-functions.min.json
- CSV 13.6 KB
/v1/css-functions.csv
- TypeScript 21.3 KB
/v1/css-functions.ts
export const cssFunctions
type CssFunction = (typeof cssFunctions)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | CSS function name including the trailing parentheses | calc() |
| category | string | Functional category such as math, color, transform, gradient, or filter | math |
| description | string | Short explanation of the function's purpose and behavior | Performs arithmetic calculations mixing different CSS units. |
Preview
First 10 records.
| name | category | description |
|---|---|---|
| abs() | math | Returns the absolute value of a number, always yielding a non-negative result. |
| acos() | math | Returns the arccosine (inverse cosine) of a number, in radians. |
| anchor() | anchor-positioning | Returns a length relative to an edge of an anchor element, for use in the inset properties of an anchor-positioned element. |
| anchor-size() | anchor-positioning | Returns a length equal to a dimension (width, height, block or inline size) of an anchor element, for sizing anchor-positioned elements. |
| annotation() | font | Selects an alternate character annotation glyph from a font's OpenType feature set. |
| asin() | math | Returns the arcsine (inverse sine) of a number, in radians. |
| atan() | math | Returns the arctangent (inverse tangent) of a number, in radians. |
| atan2() | math | Returns the arctangent of the ratio of two values, in radians, correctly handling the sign of both arguments. |
| attr() | attribute | Retrieves the value of an HTML attribute of the selected element and uses it in the style declaration. |
| blur() | filter | Applies a Gaussian blur effect to the element or image, softening edges and details. |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/css-functions.json | jq '.[0]' import type { CssFunction } from "https://staticdata.dev/v1/css-functions.ts";
const res = await fetch("https://staticdata.dev/v1/css-functions.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const cssFunctions: CssFunction[] = await res.json();
console.log(cssFunctions[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/css-functions.min.json") as r:
cssFunctions = json.load(r)
print(cssFunctions[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/css-functions.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-functions.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
This dataset enumerates 124 standard CSS functional notations documented by MDN Web Docs and the CSS specifications, as of October 2026, including newer additions such as anchor(), light-dark(), if(), sibling-index() and calc-size(). It is curated rather than exhaustive: some very new or narrowly scoped functions may be missing. CSS functions are used as values in CSS property declarations and follow the syntax function-name(arguments). Each record includes the function name (with trailing parentheses to match the CSS specification convention), a category grouping, and a concise description of the function’s purpose.
The dataset spans all major CSS function categories: mathematical functions (calc(), min(), max(), clamp(), round(), mod(), rem(), trigonometric and exponential functions), color functions (rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), color(), color-mix()), transform functions (translate(), rotate(), scale(), skew(), matrix(), perspective(), and their 3D/axis-specific variants), gradient functions, filter functions, shape functions for clip-path and shape-outside, counter functions, CSS variable and environment functions, font variant functions, easing functions for animations, and image/resource functions.
Non-standard, vendor-prefixed, or deprecated functions are excluded. This dataset is useful for building CSS linters, syntax highlighters, auto-complete tools, documentation sites, or any application that needs programmatic access to the set of valid CSS function 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-functions changelog for this dataset's history.
Related datasets
More Code datasets
- ansi-colors
- ascii
- cron-presets
- css-named-colors
- 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