This article serves as a comprehensive cheat sheet of CSS functions categorized by type with examples and descriptions.
Math functions like calc(), abs(), acos(), and sin() allow for arithmetic, trigonometric and logarithmic operations in CSS.
Transform functions such as translate(), scale(), and rotate() enable elements to be moved, scaled, and rotated in 2D and 3D space.
Color functions like rgb(), hsl(), and lab() provide different color representation and manipulation methods in CSS.
Filter functions like blur(), grayscale(), and sepia() offer effects for adjusting element appearance such as blurring, color saturation, and grayscale conversion.
Gradient functions like linear-gradient() and radial-gradient() create color transitions and patterns for backgrounds in CSS.
Counter functions like counter() and counters() aid in displaying and managing CSS counters for numbered content.
Shape functions like circle(), polygon(), and path() define clipping paths for elements, allowing for complex shapes and layouts.
Reference functions like attr(), env(), and var() help in accessing attributes, environment variables, and custom properties in CSS.
Animation and timing functions such as cubic-bezier() and steps() control the timing and progress of animations and transitions.
Miscellaneous functions like cross-fade(), character-variant(), and element() provide experimental features for advanced design and interactions.