Style
An HTML style element.
The Style element renders its children WITHOUT HTML-escaping, allowing inline CSS to be rendered as-is. Provides convenience method inlineCss(code) to inject CSS code directly.
Equality is structural across all Element implementations, including the text-escaping semantics: because Style renders its children unescaped, it never equals an equally-shaped Generic("style", ...), whose children would be escaped on render.
Value parameters
- attributes
-
attribute key-value pairs
- children
-
child DOM nodes (typically Text with CSS code)
Attributes
- Source
- Dom.scala
- Graph
-
- Supertypes
-
trait Elementtrait CssSelectabletrait Domtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Checks whether this instance is equal to that. This universal equality method is defined in AnyRef.
Checks whether this instance is equal to that. This universal equality method is defined in AnyRef.
Attributes
- Definition Classes
-
Equals -> Any
- Source
- Dom.scala
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
Any
- Source
- Dom.scala
Attributes
- Source
- Dom.scala
Attributes
- Source
- Dom.scala
Inherited methods
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
Collects all nodes in the tree matching the given partial function.
Collects all nodes in the tree matching the given partial function.
Traverses the entire tree in depth-first order, applying the partial function to each node and collecting matches.
Value parameters
- pf
-
the partial function to apply; nodes that match contribute their transformed values
Attributes
Attributes
- Inherited from:
- CssSelectable
- Source
- CssSelectable.scala
Filters the tree to keep only nodes satisfying the predicate.
Filters the tree to keep only nodes satisfying the predicate.
Removes any node for which the predicate returns false, and recursively filters children. Empty branches collapse to Empty.
Value parameters
- predicate
-
the condition each node must satisfy
Attributes
Finds the first node in the tree satisfying the predicate.
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
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
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
Renders the DOM tree to a pretty-printed HTML string with indentation.
Renders the DOM tree to a pretty-printed HTML string with indentation.
Text content is HTML-escaped. Script and Style elements render their children without escaping to allow inline code.
Value parameters
- indent
-
the number of spaces per indentation level; if <= 0, behaves like
render
Attributes
Renders the DOM tree to a minified HTML string.
Selects all descendant nodes matching the given CSS selector.
Selects all descendant nodes matching the given CSS selector.
Value parameters
- selector
-
the CSS selector to match against
Attributes
- Returns
-
a DomSelection containing all matching descendant nodes
- Inherited from:
- Dom
- Source
- Dom.scala
Attributes
- Inherited from:
- CssSelectable
- Source
- CssSelectable.scala
Attributes
- Inherited from:
- CssSelectable
- Source
- CssSelectable.scala
Transforms every node in the tree using the given function.
Transforms every node in the tree using the given function.
Applies the transformation function to each node in depth-first order, then recursively transforms children of Elements. Suitable for rewriting the tree, e.g., removing nodes, modifying attributes, or simplifying structure.
Value parameters
- f
-
the transformation function to apply to each node
Attributes
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