StyleSelector

laika.ast.StyleSelector
case class StyleSelector(predicates: Set[StylePredicate], parent: Option[ParentSelector], order: Int)

Responsible for determining whether a style declaration should be applied to a target element, basing its decision on a set of predicates.

Value parameters

order

the index of the style declaration this selector belongs to

parent

the optional parent selector

predicates

the set of predicates that need to hold for this selector to be applicable to a target element

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def matches(target: Element, parents: Seq[Element]): Boolean

Indicates whether this selector applies to the specified target element.

Indicates whether this selector applies to the specified target element.

Value parameters

parents

the parents of the specified target element, which also need to match in case this selector has parent selectors.

target

the target element to apply this selector to

Attributes

Returns

true if this selector matches the target element

The specificity of this selector, calculated from the specificity of its predicates and the order.

The specificity of this selector, calculated from the specificity of its predicates and the order.

Used to calculate the precedence if multiple selectors apply to the same target element.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product