StyleBuilders

trait StyleBuilders[StyleSetter]

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 parameters:
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

protected def buildDoubleStyleSetter(style: Style[Double], value: Double): StyleSetter
protected def buildIntStyleSetter(style: Style[Int], value: Int): StyleSetter
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

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