StyleBuilders

trait StyleBuilders[StyleSetter]

This trait contains functionality for creating Styles and Style Setters.

This trait contains functionality for creating Styles and Style Setters.

If extending or instantiating this trait, you will need to override implicit defs. See the SimpleStyleBuilder trait in Scala DOM Builder project for an example of that.

Type Params
StyleSetter

– represents an operation of setting a certain CSS style property to a certain value. Often a subtype of com.raquo.domtypes.generic.Modifier

class Object
trait Matchable
class Any

Value members

Abstract methods

@inline
protected def buildDoubleStyleSetter(style: Style[Double], value: Double): StyleSetter
@inline
protected def buildIntStyleSetter(style: Style[Int], value: Int): StyleSetter
@inline
protected def buildStringStyleSetter(style: Style[_], value: String): StyleSetter

Pretty much every CSS Style can be set to some string like "auto" or "inherit", so we provide this as an escape hatch for all Style[_] objects even if they typically contain Int or Double values.

Pretty much every CSS Style can be set to some string like "auto" or "inherit", so we provide this as an escape hatch for all Style[_] objects even if they typically contain Int or Double values.

We do not want to use Scala.js' | type operator because it is not supported on the JVM.

Concrete methods

@inline
protected def style[V](key: String): Style[V]