counter()

The counter() function takes the number (or symbol) of a list item and makes it available to display outside the list. In other words, it makes things that aren’t lists look like lists. For example, we can take the current list number of an existing list counter, format it as a Roman numeral, then display it in front of a heading:

h2::before {  content: counter(my-counter, upper-roman) ". "; }
Continue Reading

counters()

The CSS counters() function can combine multiple lists into a single list. So, if you have two active counters on the page, counters() can be used to combine them so that the list numbers are used to count the items in both lists together.

li::marker { content: counters(item, ".") ") "; }
Continue Reading

calc-size()

The CSS calc-size() function enables us to perform calculations using intrinsic size values such as auto, min-content, max-content, and fit-content. […]

.element { width: calc-size(auto, size); }
Continue Reading

color()

The CSS color() function allows you to use a color directly from a color space, either an existing color space or a custom one.

.element { color: color(rec2020 0.5 0.15 0.115 / 0.5); }
Continue Reading

clamp()

The CSS clamp() function locks a value between a minimum and maximum, using a preferred value within that range.

.element { width: clamp(200px, 50%, 800px); }
Continue Reading

cubic-bezier()

The cubic-bezier() function lets you define custom timing curves for CSS animations and transitions. It gives you precise control over how elements […]

.element { transition: all 1s cubic-bezier(0.1, 0.9, 0.9, 0.1); }
Continue Reading

circle()

The CSS circle() function allows you to create, you guessed it, circles when used with the shape-outside, clip-path, and offset-path […]

.shape { clip-path: circle(100px); }
Continue Reading