Inline

abstract class Inline(implicit val cssRegister: Register) extends Base with Mixin

An inline stylesheet has the following properties:

  • Intent is to create styles that can be applied directly to HTML in Scala/Scala.JS.
  • Each style is stored in a val of type StyleA.
  • Styles are applied to HTML by setting the class attribute of the HTML to the class(es) in a StyleA.
  • Style class names / CSS selectors are automatically generated.
  • All style types (StyleS, StyleF) are usable.
trait Mixin
class Base
class Object
trait Matchable
class Any

Type members

Classlikes

protected class MFontFace extends MFontFace
protected class MKStyle extends MStyle
protected class MKeyframes(name: String) extends MKeyframes
protected class MStyle(name: String) extends MStyle
protected class MStyleF(name: String) extends MStyleF

Inherited classlikes

protected object dsl
Inherited from
Base

Value members

Concrete methods

@inline
final protected def &: Cond
override protected def `__macroFontFace`: MFontFace
Definition Classes
override protected def `__macroKeyframe`: MStyle
Definition Classes
override protected def `__macroKeyframes`(name: String): MKeyframes
Definition Classes
override protected def `__macroStyleF`(name: String): MStyleF
Definition Classes
override protected def `__macroStyle`(name: String): MStyle
Definition Classes
@nowarn("cat=unused")
protected def initInnerObjects(a: StyleA*): Unit

Objects in Scala are lazy. If you put styles in inner objects you need to make sure they're initialised before your styles are rendered. To do so, call this at the end of your stylesheet with one style from each inner object.

Objects in Scala are lazy. If you put styles in inner objects you need to make sure they're initialised before your styles are rendered. To do so, call this at the end of your stylesheet with one style from each inner object.

Inherited methods

final def css(implicit env: Env): Css
Inherited from
Base
final inline protected def fontFace: MFontFace
Inherited from
Mixin
final inline protected def keyframe: MStyle
Inherited from
Mixin
final inline protected def keyframes: MKeyframes
Inherited from
Mixin
final def render[Out](implicit r: Renderer[Out], env: Env): Out

Render registered styles into some format, usually a String of plain CSS.

Render registered styles into some format, usually a String of plain CSS.

Value Params
env

The target environment in which the styles are to be used. Allows customisation of required CSS.

Inherited from
Base
final def renderA[Out](implicit r: Renderer[Out]): Out

Render registered styles into some format, usually a String of plain CSS.

Render registered styles into some format, usually a String of plain CSS.

The A suffix stands for ''absolute'', in that it doesn't perform any environment customisation, and as such an Env isn't required.

Inherited from
Base
final inline protected def style: MStyle
Inherited from
Mixin
final inline protected def styleF: MStyleF
Inherited from
Mixin
final def styles: Vector[StyleA]
Inherited from
Base

Implicits

Implicits

implicit protected val cssRegister: Register

Inherited implicits

implicit protected val classNameHint: ClassNameHint
Inherited from
Base