Next: , Previous: , Up: API  


1.10 (olive-css dsl)

1.10.1 Macros

Macro: declaration-property x

Undocumented macro.

Macro: declaration-value x

Undocumented macro.

Macro: declaration? x

Undocumented macro.

Macro: make-declaration x

Undocumented macro.

Macro: make-rule x

Undocumented macro.

Macro: rule-declarations x

Undocumented macro.

Macro: rule-selector x

Undocumented macro.

Macro: rule? x

Undocumented macro.

Macro: set-rule-selector! x

Undocumented macro.

1.10.2 Procedures

Procedure: add-hover-variant sel args

Transform utility rules in args into nested interactive pseudo-classes matching &:hover targets prefixed by sel.

Procedure: add-media-query-prefix sel args

Prefix utility class selectors within args to incorporate a specific media query screen size token sel.

Procedure: css-color-rules selector KEY: #:property #:variants #:other-properties #:palettes

Construct color-specific utility rules mapping across specified palettes, configurations, and opacity variants.

Procedure: css-comment msg

Format a given string message msg inside a CSS multi-line block comment wrapper.

Procedure: css-declaration property value

Undocumented procedure.

Procedure: css-rule selector . args

Construct a new CSS rule object containing a target selector and flattened args declarations.

Procedure: css-rule-variants selector KEY: #:property #:variants #:other-properties

Generate a list of CSS rules from a template selector across multiple string value variants.

Procedure: css-size s KEY: #:conversion #:multiplier

Process a sizing pair s by modifying numeric values via a multiplier and formatting output with conversion.

Procedure: darken-oklch xs n

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.

Procedure: flatten-list xs

Recursively flatten a deeply nested list xs into a single flat list.

(flatten-list '(1 (2 3) 4)) ⇒ '(1 2 3 4)
Procedure: format-css xs

Recursively transform an arbitrarily structured hierarchy of rule records, lists, or declarations xs into valid CSS text format strings.

Procedure: identity-oklch oklch some

Return the original oklch components completely unmodified, ignoring some.

Procedure: lighten-oklch xs n

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.

Procedure: list-combinations list1 list2

Compute all combinations (Cartesian product) of elements present between list1 and list2.

Procedure: make-palette oklch KEY: #:transformers

Generate a tiered color palette mapping variant weights (e.g., 100, 500, 900) to transformed variations of a base oklch configuration.

Procedure: media-query query . args

Wrap an evaluated set of stylesheet components inside a CSS modern media query expression container block.

(media-query "min-width: 768px" ".container { display: block; }")
Procedure: to-percent x

Convert a decimal numeric ratio or number x into a standard CSS percentage % string token.

Procedure: to-percent-function f

Return a higher-order closure function transforming numbers into CSS functional notations f scaling values in percentage terms.

Procedure: to-px x

Convert a primitive numeric measurement value x into a standard CSS px string value.

Procedure: to-rem x

Convert a primitive numeric measurement value x into a standard CSS rem string value.

Procedure: to-rem-blur x

Wrap a native numeric measurement value x within a valid CSS standard blur(...) layout definition.

Procedure: ~ KEY: #:output-port . args

Format a string with arguments. This is a descriptive alias for format with an optional destination port.

(~ "color: ~a;" "red") ⇒ "color: red;"

1.10.3 Record Types

Record type: declaration

This record type has the following fields:

  • property
  • value
Record type: rule

This record type has the following fields:

  • selector
  • declarations

1.10.4 Variables

Variable: where-dark
"&:where([data-theme=dark], [data-theme=dark] *)"

Next: (olive-css main), Previous: (olive-css decl typography), Up: API