CSSParsers

object CSSParsers

Parsers for the subset of CSS supported by Laika.

Not supported are attribute selectors, pseudo classes, namespaces and media queries.

class Object
trait Matchable
class Any

Type members

Classlikes

case object Child extends Combinator

A combinator for an immediate child.

A combinator for an immediate child.

sealed abstract class Combinator

Represents a combinator between two predicates.

Represents a combinator between two predicates.

case object Descendant extends Combinator

A combinator for a descendant on any nesting level.

A combinator for a descendant on any nesting level.

case class Style(name: String, value: String)

Represents a single style within a style declaration.

Represents a single style within a style declaration.

Value members

Concrete fields

Parses a combinator between two predicates.

Parses a combinator between two predicates.

val comment: Parser[Unit]

Parses a single CSS comment.

Parses a single CSS comment.

Parses a single predicate.

Parses a single predicate.

Parses a single selector.

Parses a single selector.

Parses a sequence of selectors, separated by a comma.

Parses a sequence of selectors, separated by a comma.

Parses the sub-part of a selector without any combinators, e.g. Paragraph#title.

Parses the sub-part of a selector without any combinators, e.g. Paragraph#title.

Parses a single style within a declaration.

Parses a single style within a declaration.

Parses an entire set of style declarations. This is the top level parser of this trait.

Parses an entire set of style declarations. This is the top level parser of this trait.

Parses a sequence of style declarations, ignoring any comments.

Parses a sequence of style declarations, ignoring any comments.

val styleRefName: Parser[String]

Parses the name of a style. The name must start with a letter, while subsequent characters can be letters, digits or one of the symbols '-' or '_'.

Parses the name of a style. The name must start with a letter, while subsequent characters can be letters, digits or one of the symbols '-' or '_'.

val styleValue: Parser[String]

Parses the value of a single style, ignoring any comments..

Parses the value of a single style, ignoring any comments..

Parses a single type selector.

Parses a single type selector.

val wsOrNl: Parser[String]

Parses horizontal whitespace or newline characters.

Parses horizontal whitespace or newline characters.