CSS Functions
CSS · Methods reference
CSS · Methods reference
📋 Overview
Common CSS functions used in property values.
🔧 Methods
Math & sizing
| Function | Description |
|---|---|
calc() | Arithmetic with mixed units |
min() / max() / clamp() | Responsive bounds |
minmax() | Grid track min/max |
repeat() | Grid track repetition |
fit-content() | min(max-content, limit) |
Other
| Function | Description |
|---|---|
var(--name, fallback?) | Custom property reference |
url() / image-set() | Image sources |
attr() | Use HTML attribute value in CSS |
counter() / counters() | Generated content counters |
env() / constant() | Safe area insets (mobile) |
blur() / brightness() / … | Filter functions |
translate() / rotate() / scale() | Transform functions |
💡 Examples
See parent topic notes for runnable snippets; this page is the complete method index.
⚠️ Pitfalls
- Mutating methods return
Nonein Python — do not chainsort()/reverse()expecting a new list. - Default JS
sort()compares strings — pass(a,b) => a-bfor numbers. - SQL function names differ by dialect — verify Postgres vs MySQL docs.
- Django
QuerySet.update()skipssave()signals and autoauto_nowfields on models.