scalacss.internal

Type members

Classlikes

final case class AV(attr: Attr, value: Value)

An Attribute-and-Value pair.

An Attribute-and-Value pair.

Companion
object
object AV
Companion
class
final class AVs

One or more ordered attributes, each with one or more ordered values.

One or more ordered attributes, each with one or more ordered values.

Companion
object
object AVs
Companion
class
final class AliasAttr(id: String, gen: Gen, val targets: Need[NonEmptyVector[Attr]]) extends Attr
sealed abstract class Attr(val id: String, val gen: Gen)

A style attribute.

A style attribute.

Often this will represent a single CSS attribute, eg. "margin-left". This can also represent a high-level attribute and generate multiple CSS keys.

Value Params
id

A name by which this attribute can be identified. It is used for attribute equality and describing itself in messages to the developer. It doesn't not appear in output CSS.

Companion
object
object Attr
Companion
class
abstract class AttrAliasesAndValueTRules extends Rules
sealed abstract class AttrCmp
Companion
object
object AttrCmp
Companion
class
object Attrs
object CanIUse
object CanIUse2

Derivations of the raw data in CanIUse.

Derivations of the raw data in CanIUse.

final case class ClassName(value: String)
Companion
object
object ClassName
Companion
class
final case class ClassNameHint(value: String)

Text to include in generated class names.

Text to include in generated class names.

mutable.Register.NameGens can choose to include it in the output class names, or ignore it.

object Color extends ColorOps[ValueT[Color]]
trait ColorOps[Out]
final case class Compose(rules: Rules)

Style composition logic.

Style composition logic.

This is responsible for merges styles together, and producing warnings. It has the power to perform merges on conflicting CSS values, and selectively ignore merges.

Companion
object
object Compose
Companion
class
final case class Cond(pseudo: Option[Pseudo], mediaQueries: Vector[Query]) extends ChainOps[Cond]

Condition under which CSS is applicable.

Condition under which CSS is applicable.

Companion
object
object Cond
Companion
class
object Css
sealed trait CssEntry
Companion
object
object CssEntry
Companion
class
final case class CssKV(key: String, value: String)

A CSS attribute and its corresponding value.

A CSS attribute and its corresponding value.

Example: CssKV("margin-bottom", "12px")

Companion
object
object CssKV
Companion
class
trait Domain[A]
Companion
object
object Domain
Companion
class
object Dsl extends DslBase
object DslBase
Companion
class
Companion
object
object DslMacros
object Env
Companion
class
final case class Env(platform: Platform[[A] =>> Option[A]], media: Media[[A] =>> Option[A]])
Companion
object
final case class FontFace[FF](fontFamily: FF, src: NonEmptyVector[String], fontStretchValue: Option[Value], fontStyleValue: Option[Value], fontWeightValue: Option[Value], unicodeRangeValue: Option[UnicodeRange])

Font face declaration

object FontFace
Companion
class
final case class Keyframes(name: KeyframeAnimationName, frames: Seq[(KeyframeSelector, StyleA)])

Animation keyframes.

Animation keyframes.

Value Params
frames

Frame definitions.

name

Name of animation.

final case class Length[@specialized N](n: N, u: LengthUnit)
Companion
object
object Length
Companion
class
sealed abstract class LengthUnit(val value: String)
Companion
object
object LengthUnit
Companion
class
abstract class Literal(val value: Value)

A ''typed'' literal.

A ''typed'' literal.

Companion
object

Most literals here are just strings. Type-safety is usually provided by the TypedAttr methods.

Most literals here are just strings. Type-safety is usually provided by the TypedAttr methods.

In some cases literals need to be typed to be part of a ValueClass so that they can be used as typed args. Eg. auto in margin(12 px, auto).

For that reason exists the dichotomy between Literal with its untyped Values, and Literal.Typed with its subclassed Literals.

Companion
class
object Macros
object Media
object ModeMacros
object NaturalOrdering extends Ordering[String]
final class Need[+A](thunk: () => A)
Companion
object
object Need
Companion
class
final class NonEmptyVector[+A](val head: A, val tail: Vector[A])
Companion
object
Companion
class
final case class Percentage[@specialized N](n: N)
Companion
object
object Percentage
Companion
class
object Platform
sealed abstract class Pseudo extends ChainOps[Pseudo]

A pseudo-class is used to define a special state of an element.

A pseudo-class is used to define a special state of an element.

Companion
object
object Pseudo
Companion
class
sealed abstract class PseudoType(val priority: Short)

http://www.w3.org/TR/selectors/#selector-syntax

object PseudoType
Companion
class
final case class Ratio(x: Int, y: Int)
Companion
object
object Ratio
Companion
class
final class RealAttr(id: String, gen: Gen) extends Attr
trait Renderer[+Out]

Render Css, an internal representation of CSS, into a different format; usually real CSS text.

Render Css, an internal representation of CSS, into a different format; usually real CSS text.

final case class Resolution[@specialized N](n: N, u: ResolutionUnit)
sealed abstract class ResolutionUnit(val value: String)
Companion
object
Companion
class
sealed trait Style

A high-level style, that can describe a subject and its children in a variety of conditions.

A high-level style, that can describe a subject and its children in a variety of conditions.

==Types==

Companion
object
object Style
Companion
class
sealed abstract class Style1 extends Style

A single style that applied to a single subject.

A single style that applied to a single subject.

final case class StyleA(className: ClassName, addClassNames: Vector[ClassName], style: StyleS)

Applicable style.

Applicable style.

A style that needs no more processing and can be applied to some target.

Value Params
addClassNames

Additional class names that the style has requested be appended. Allows ScalaCSS styles to use classname-based CSS libraries like Bootstrap.

final class StyleF[I](val f: I => StyleS, val domain: Domain[I]) extends Style1

A function to a style. A style that depends on input provided when used.

A function to a style. A style that depends on input provided when used.

Type Params
I

Input required by the style.

Value Params
domain

The function domain. All possible (or legal) inputs to this function.

Companion
object
object StyleF
Companion
class
trait StyleLookup[I]
Companion
object
object StyleLookup
Companion
class
final case class StyleS(data: SortedMap[Cond, AVs], unsafeExts: UnsafeExts, className: Option[ClassName], addClassNames: Vector[ClassName], warnings: Vector[Warning]) extends Style1

A static style.

A static style.

Value Params
addClassNames

Additional class names to be appended to the resulting StyleA. Allows ScalaCSS styles to use classname-based CSS libraries like Bootstrap.

className

Manually specifies this style's class name. By default it is automatically generated.

Companion
object
object StyleS
Companion
class
trait ToAV
class Transform(val run: Env => CssKV => Vector[CssKV])

Transforms key-values into different and/or more key-values.

Transforms key-values into different and/or more key-values.

Generally used to apply browser prefixes. For example, to turn border-radius: 1em/5em; into

 -moz-border-radius: 1em/5em;
 -webkit-border-radius: 1em/5em;
 border-radius: 1em/5em;
Companion
object
object Transform
Companion
class

Gets merged into Dsl.

Gets merged into Dsl.

case class UnicodeRange(from: Int, to: Int)

Defines the range of unicode characters the font face supports.

Defines the range of unicode characters the font face supports.

Companion
object
object UnicodeRange
Companion
class
final case class ValueT[T <: ValueClass](value: Value)

A CSS value that is valid for some context T.

A CSS value that is valid for some context T.

Companion
object
object ValueT
Companion
class
final case class Warning(cond: Cond, msg: WarningMsg)

Types

type Css = Vector[CssEntry]

A stylesheet in its entirety. Normally turned into a .css file or a &lt;style&gt; tag.

A stylesheet in its entirety. Normally turned into a .css file or a &lt;style&gt; tag.

type CssMediaQuery = String

A media query in CSS.

A media query in CSS.

Examples: "@media screen and (device-aspect-ratio: 16/9)".

type CssSelector = String

Describes the context of a number of CSS attribute-value pairs.

Describes the context of a number of CSS attribute-value pairs.

Examples: "div", ".debug", "h3.bottom", "a:visited".

type FontFaceStream = List[FontFace]

Keyframe animations in CSS.

Keyframe animations in CSS.

This is the name of a @keyframes group.

type StyleStream = Vector[Style]
type Value = String

A CSS value, like "none", "solid 3px black".

A CSS value, like "none", "solid 3px black".

type WarningMsg = String

Value members

Concrete methods

def Vector1[A](a: A): Vector[A]

Faster than Vector(a)

Faster than Vector(a)

@nowarn("cat=unused")
def memo[A, B](f: A => B)(implicit evidence$1: UnivEq[A]): A => B
def optionAppend[A](oa: Option[A], ob: Option[A])(f: (A, A) => A): Option[A]

Implicits

Implicits

implicit def univEqCss: UnivEq[Css]