counters()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The counters()
CSS function enables combining markers when nesting counters. The function returns a string that concatenates the current values of the named and nested counters, if any are present, with the string provided. The third, optional parameter enables defining the list style.
The counters()
function is generally used within pseudo-element through the content
property, but theoretically, it can be used wherever a
value is supported.
The counters()
function has two forms: counters(
and counters(