Makeup v0.2.0 Makeup.Styles.HTML.TokenStyle View Source
A CSS style for a single token.
Link to this section Summary
Functions
A TokenStyle
is considered empty if all its fields are nil
Creates a TokenStyle
from string description
A TokenStyle
is empty if at least a field is not nil
Link to this section Functions
A TokenStyle
is considered empty if all its fields are nil
.
A CSS class for an empty TokenStyle
is not rendered in the stylesheet.
This saves a little space and makes the stylesheet more human-readable.
Creates a TokenStyle
from string description.
The string description is highly optimized for the goal of being typed by a human. The following commands are recognized:
~r/#[0-9a-f]+/
for foreround color~r/bg:#[0-9a-f]+/
for background color~r/border:#[0-9a-f]+/
for border coloritalic
forfont-style: italic
oblique
forfont-style: oblique
noitalic
forfont-style: normal
underline
forfont-style: underline
No other commands are currently recognized.
TODO: Add examples
Link to this function
new(map_or_kwlist, opts \\ [])
View Source
new(ExConstructor.map_or_kwlist, Keyword.t) :: %Makeup.Styles.HTML.TokenStyle{background_color: term, border: term, color: term, font_style: term, font_weight: term, literal: term, text_decoration: term}
A TokenStyle
is empty if at least a field is not nil
.
A CSS class for an empty TokenStyle
is rendered in the stylesheet.