An Attribute-and-Value pair.
One or more ordered attributes, each with one or more ordered values.
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.
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.
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.
Condition under which CSS is applicable.
A stylesheet in its entirety.
A stylesheet in its entirety. Normally turned into a .css
file or a <style>
tag.
A CSS attribute and its corresponding value.
A CSS attribute and its corresponding value.
Example: CssKV("margin-bottom", "12px")
A media query in CSS.
A media query in CSS.
Examples: "@media screen and (device-aspect-ratio: 16/9)"
.
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"
.
A typed literal.
A pseudo-class is used to define a special state of an element.
A single Pseudo instance.
A single Pseudo instance. Not a composite.
(Note: Not may have a nested value but is not a composite.
http://www.w3.org/TR/selectors/#selector-syntax
Render Css, an internal representation of CSS, into a different format; usually real CSS text.
A high-level style, that can describe a subject and its children in a variety of conditions.
A single style that applied to a single subject.
Applicable style.
Applicable style.
A style that needs no more processing and can be applied to some target.
Additional class names that the style has requested be appended. Allows ScalaCSS styles to use classname-based CSS libraries like Bootstrap.
A composite style.
A composite style. Two more or more styles that must be applied as a whole in order to be successful.
This demands that anyone using this style:
2. Acknowledge the purpose of each sub-style (and thus not accept them in the wrong order and apply them to the wrong targets).
Before styles can be composed, they must be annotated with a name. Do so like avatarStyle.named('avatar)
.
Named styles can then be composed using :*:
.
val profileStyle: StyleC = titleStyle.named('title) :*: avatarStyle.named('avatar) :*: buttonStyle.named('btn)
A function to a style.
A function to a style. A style that depends on input provided when used.
Input required by the style.
A static style.
A static style.
Manually specifies this style's class name. By default it is automatically generated.
Additional class names to be appended to the resulting StyleA. Allows ScalaCSS styles to use classname-based CSS libraries like Bootstrap.
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;
Gets merged into Dsl.
A CSS value, like "none"
, "solid 3px black"
.
A CSS value that is valid for some context T
.
Derivations of the raw data in CanIUse.
Default config.
Default config.
Use the scalac -Xelide-below
flag to switch from development- to production-mode.
Development-mode defaults.
Development-mode defaults. Pretty names, pretty CSS, warnings.
Most literals here are just strings.
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.
Production-mode defaults.
Production-mode defaults. Minimised CSS, no warnings.