Stylesheet

com.alecdorrington.laminarcomponents.Stylesheet
See theStylesheet companion object
final class Stylesheet extends Modifier[Base]

A stylesheet written in Scala (Css), kept beside the view it styles and given to the view's element as a modifier: the first element given it adds it to the page's head, where it stays.

Value parameters

blocks

Its rules, in order.

layer

The cascade layer its rules go in, if any. Rules in no layer outweigh those in any layer, whatever their selectors, so that a page restyles a layered component without matching its selectors.

Attributes

Companion
object
Graph
Supertypes
trait Modifier[Base]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(): Unit

Adds the stylesheet to the page's head, unless it is there already.

Adds the stylesheet to the page's head, unless it is there already.

Attributes

override def apply(element: Base): Unit

Adds the stylesheet as its element is made.

Adds the stylesheet as its element is made.

Value parameters

element

The element styled.

Attributes

Definition Classes
Modifier

Concrete fields

val blocks: Seq[Block]
lazy val css: String

The stylesheet's CSS.

The stylesheet's CSS.

Attributes

val layer: Option[String]