monks/counter_set

The counter-set CSS property sets CSS counters on the element to the given values.

If the counters don’t exist the counter-set property creates a new counter for each named counter in the list of space-separated counter and value pairs. However, to create a new counter it is recommended to use the {{cssxref(“counter-reset”)}} CSS property.

If a named counter in the list is missing a value, the value of the counter will be set to 0.

The counter’s value can be incremented or decremented using the {{cssxref(“counter-increment”)}} CSS property.

Values

pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const none: #(String, String)
  • : No counter set is to be performed. This can be used to override a counter-set defined in a less specific rule.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for counter-set

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for counter-set. It will be wrapped in var() and have -- prepended.

Search Document