CssSelector

zio.blocks.html.CssSelector
See theCssSelector companion object
sealed trait CssSelector extends CssSelectable, Product, Serializable

A sealed ADT representing CSS selectors with type-safe composition.

Selectors can be combined using operators:

  • > — child combinator
  • >> — descendant combinator
  • + — adjacent sibling
  • ~ — general sibling
  • & — concatenation (and)
  • | — grouping (or)

Values in attribute selectors are escaped to prevent CSS injection. Use CssSelector.Raw(string) for selectors not expressible via the ADT.

Attributes

Companion
object
Source
CssSelector.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class And
class Attribute
class Child
class Class
class Descendant
class Element
class Id
class Not
class Or
class PseudoClass
class Raw
object Universal
Show all

Members list

Value members

Abstract methods

def render: String

Attributes

Source
CssSelector.scala

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
CssSelector.scala

Inherited methods

def &(other: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def +(adjacent: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def >(child: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def >>(descendant: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def nthChild(formula: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def nthChild(n: Int): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def part(name: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def productElementName(n: Int): String

The name of the n^th^ element of this product, 0-based. In the default implementation, an empty string.

The name of the n^th^ element of this product, 0-based. In the default implementation, an empty string.

Value parameters

n

the index of the element name to return

Attributes

Returns

the name of the specified element

Throws
IndexOutOfBoundsException

if the n is out of range(n < 0 || n >= productArity).

Inherited from:
Product
Source
Product.scala
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala
def productPrefix: String

A string used in the toString methods of derived classes. Implementations may override this method to prepend a string prefix to the result of toString methods.

A string used in the toString methods of derived classes. Implementations may override this method to prepend a string prefix to the result of toString methods.

Attributes

Returns

in the default implementation, the empty string

Inherited from:
Product
Source
Product.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttribute(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttribute(attr: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttributeContaining(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttributeEnding(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttributePrefix(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttributeStarting(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def withAttributeWord(attr: String, value: String): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def |(other: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala
def ~(sibling: CssSelectable): CssSelector

Attributes

Inherited from:
CssSelectable
Source
CssSelectable.scala

Inherited and Abstract methods

def canEqual(that: Any): Boolean

Checks whether this instance can possibly equal that.

Checks whether this instance can possibly equal that.

A method that should be called from every well-designed equals method that is open to be overridden in a subclass. See Programming in Scala, Chapter 28 for discussion and design.

Value parameters

that

the value being probed for possible equality

Attributes

Returns

true if this instance can possibly equal that, otherwise false

Inherited from:
Equals
Source
Equals.scala
def productArity: Int

The size of this product.

The size of this product.

Attributes

Returns

for a product A(x,,1,,, ..., x,,k,,), returns k

Inherited from:
Product
Source
Product.scala
def productElement(n: Int): Any

The n^th^ element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,), returns x,,(n+1),, where `0 = productArity).

The n^th^ element of this product, 0-based. In other words, for a product A(x,,1,,, ..., x,,k,,), returns x,,(n+1),, where `0 = productArity).

Attributes

Returns

the element n elements after the first element

Inherited from:
Product
Source
Product.scala

Concrete fields

Attributes

Source
CssSelector.scala