package tw

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tw.PropertySource

Helpers for building the @layer properties block.

split stmts partitions into (@property rules, other statements).

dedup props deduplicates @property rules by name, keeping the first of each name. CSS Properties and Values API 1 sec. 2 gives the last registration for a name, which is what cascade's canonicaliser keeps; nothing rides on the difference here because tw's duplicates all come from one Var and are identical.

Sourceval initial_values : Cascade.Css.statement list -> (string * Cascade.Css.declaration) list

initial_values stmts extracts (name, initial-value declaration) pairs from @property rules, in order.

Sourceval sort_by_order : (string -> int) -> (string * Cascade.Css.declaration) list -> (string * Cascade.Css.declaration) list

sort_by_order f pairs sorts (name, initial) pairs using a provided name->order function.