Next: (olive-css license), Previous: (olive-css decl typography), Up: API
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Undocumented macro.
Prefix every utility rule in args with
dark-selector-prefix.
This produces fully flat, data-theme=dark-scoped selectors (no
nested rules), which is maximally compatible. The generator instead
groups the rules under a single dark-selector-prefix scope to
avoid repeating the scope selector on every rule, which keeps the large
dark color section compact.
Transform utility rules in args into flat :hover
interactive selectors prefixed by sel.
Prefix utility class selectors within args to incorporate a specific media query screen size token sel.
Transform utility rules in args into flat interactive selectors.
Rather than emitting CSS nesting (.x{&:hover{...}}), this
produces the fully expanded selector (.x:hover{...}). The
result is plain CSS 3 (no top-level nesting dependency) and a few bytes
smaller per rule, which matters because state variants are generated for
every color and utility.
Construct color-specific utility rules mapping across specified palettes, configurations, and opacity variants.
Format a given string message msg inside a CSS multi-line block comment wrapper.
Undocumented procedure.
Generate one solid (alpha = 1) rule per palette shade.
Unlike css-color-rules this does not expand the alpha
cross-product, which keeps derived color families (ring, outline, fill,
stroke, accent, caret) affordable. selector is a format template
with two arguments: the palette name and the shade weight, e.g.
".ring-~a-~a".
Construct a new CSS rule object containing a target
selector and flattened args declarations.
Generate a list of CSS rules from a template selector across multiple string value variants.
Process a sizing pair s by modifying numeric values via a multiplier and formatting output with conversion.
Darken an OKLCH color by subtracting value n from its lightness
component. xs is a list representing OKLCH color components where
the car is lightness.
Recursively flatten a deeply nested list xs into a single flat list.
(flatten-list '(1 (2 3) 4)) ⇒ '(1 2 3 4)
Recursively transform an arbitrarily structured hierarchy of rule
records, lists, or declarations xs into valid CSS text format
strings.
Return the original oklch components completely unmodified, ignoring some.
Lighten an OKLCH color by adding value n to its lightness
component. xs is a list representing OKLCH color components where
the car is lightness.
Compute all combinations (Cartesian product) of elements present between list1 and list2.
Generate a tiered color palette mapping variant weights (e.g., 100, 500, 900) to transformed variations of a base oklch configuration.
Wrap an evaluated set of stylesheet components inside a CSS modern media query expression container block.
(media-query "min-width: 768px" ".container { display: block; }")
Collapse a formatted CSS string css into a compact, minified form.
Only whitespace that is never significant is removed: runs of whitespace are collapsed to a single space, the space after declaration separators is dropped, and braces are tightened. Descendant combinators and quoted strings (font stacks, oklch components) are preserved.
Convert a decimal numeric ratio or number x into a standard CSS
percentage % string token.
Return a higher-order closure function transforming numbers into CSS functional notations f scaling values in percentage terms.
Convert a primitive numeric measurement value x into a standard
CSS px string value.
Convert a primitive numeric measurement value x into a standard
CSS rem string value.
Wrap a native numeric measurement value x within a valid CSS
standard blur(...) layout definition.
Format a string with arguments. This is a descriptive alias for
format with an optional destination port.
(~ "color: ~a;" "red") ⇒ "color: red;"
Next: (olive-css license), Previous: (olive-css decl typography), Up: API