StylePredicate

Contains the available predicate types.

The available selector types represent a subset of the full CSS standard, picking those features which are reasonably suited in the context of the Laika document model. It includes type, class and id selectors, but no attribute selectors as most Laika tree elements primarily contain a sequence of children and not many other properties to match against.

It also supports the CSS syntax to declare selectors for child elements (e.g. Paragraph .intro) or immediate children (e.g. Paragraph > .intro).

Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case class ElementType(name: String) extends StylePredicate

A predicate that holds if the given type name matches the type of the target element. In contrast to web CSS, in Laika this is not a tag name, but the (unqualified) name of the class of the target element instance (e.g. Paragraph).

A predicate that holds if the given type name matches the type of the target element. In contrast to web CSS, in Laika this is not a tag name, but the (unqualified) name of the class of the target element instance (e.g. Paragraph).

case class Id(id: String) extends StylePredicate

A predicate that holds if the given id matches the id of the target element.

A predicate that holds if the given id matches the id of the target element.

case class StyleName(name: String) extends StylePredicate

A predicate that holds if the given style name matches one of the styles of the target element.

A predicate that holds if the given style name matches one of the styles of the target element.

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror