counters

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterStyle

type CounterStyle map[string]CounterStyleDescriptors

func (CounterStyle) RenderMarker

func (c CounterStyle) RenderMarker(counterName pr.CounterStyleID, counterValue int) string

Generates the content of a ::marker pseudo-element, for the given value.

func (CounterStyle) RenderValue

func (c CounterStyle) RenderValue(counterValue int, counterStyleName string) string

Generate the counter representation.

See https://www.w3.org/TR/css-counter-styles-3/#generate-a-counter

func (CounterStyle) RenderValueStyle

func (c CounterStyle) RenderValueStyle(counterValue int, counterStyle pr.CounterStyleID) string

RenderValueStyle is the same as `RenderValue`, for a general counter style.

type CounterStyleDescriptors

type CounterStyleDescriptors struct {
	Negative        [2]pr.NamedString
	Prefix          pr.NamedString
	Suffix          pr.NamedString
	Fallback        string
	System          CounterStyleSystem
	Pad             pr.IntNamedString
	Symbols         []pr.NamedString
	AdditiveSymbols []pr.IntNamedString
	Range           pr.OptionalRanges
}

func (*CounterStyleDescriptors) Validate

func (desc *CounterStyleDescriptors) Validate() error

type CounterStyleSystem

type CounterStyleSystem struct {
	Extends, System string
	Number          int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL