diff options
Diffstat (limited to 'stdlib/source/library/lux/data/format/css/value.lux')
-rw-r--r-- | stdlib/source/library/lux/data/format/css/value.lux | 126 |
1 files changed, 68 insertions, 58 deletions
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index ad27c40b7..79636d63a 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -33,8 +33,8 @@ (syntax (_ [symbol <code>.text]) (in (list (code.local (text.replaced "-" "_" symbol)))))) -(def: enumeration: - (template (enumeration: <abstraction> <representation> <out> <sample>+ <definition>+) +(def: enumeration + (template (_ <abstraction> <representation> <out> <sample>+ <definition>+) [(primitive: .public <abstraction> <representation> @@ -793,11 +793,13 @@ (format name) abstraction)) - (enumeration: Step Text - step - [[start "start"] - [end "end"]] - []) + (enumeration + Step + Text + step + [[start "start"] + [end "end"]] + []) (def: .public (steps intervals step) (-> Nat Step (Value Timing)) @@ -1055,19 +1057,23 @@ (list) (..apply "url"))) - (enumeration: Shape Text - shape - [[ellipse_shape "ellipse"] - [circle_shape "circle"]] - []) - - (enumeration: Extent Text - extent - [[closest_side "closest-side"] - [closest_corner "closest-corner"] - [farthest_side "farthest-side"] - [farthest_corner "farthest-corner"]] - []) + (enumeration + Shape + Text + shape + [[ellipse_shape "ellipse"] + [circle_shape "circle"]] + []) + + (enumeration + Extent + Text + extent + [[closest_side "closest-side"] + [closest_corner "closest-corner"] + [farthest_side "farthest-side"] + [farthest_corner "farthest-corner"]] + []) (with_template [<name> <function>] [(def: .public (<name> shape extent location start next) @@ -1142,28 +1148,30 @@ (-> URL (Value Content)) (|>> (list) (..apply "url"))) - (enumeration: Font Text - font_name - [[serif "serif"] - [sans_serif "sans-serif"] - [cursive "cursive"] - [fantasy "fantasy"] - [monospace "monospace"]] - [(def: .public font - (-> Text Font) - (|>> %.text abstraction)) - - (def: .public (font_family options) - (-> (List Font) (Value Font)) - (case options - {.#Item _} - (|> options - (list#each ..font_name) - (text.interposed ",") - (abstraction Value)) - - {.#End} - ..initial))]) + (enumeration + Font + Text + font_name + [[serif "serif"] + [sans_serif "sans-serif"] + [cursive "cursive"] + [fantasy "fantasy"] + [monospace "monospace"]] + [(def: .public font + (-> Text Font) + (|>> %.text abstraction)) + + (def: .public (font_family options) + (-> (List Font) (Value Font)) + (case options + {.#Item _} + (|> options + (list#each ..font_name) + (text.interposed ",") + (abstraction Value)) + + {.#End} + ..initial))]) (def: .public font_size (-> (Value Length) (Value Font_Size)) @@ -1212,22 +1220,24 @@ (-> Nat Nat (Value Ratio)) (abstraction (format (%.nat numerator) "/" (%.nat denominator)))) - (enumeration: Quote Text - quote_text - [[double_quote "\0022"] - [single_quote "\0027"] - [single_left_angle_quote "\2039"] - [single_right_angle_quote "\203A"] - [double_left_angle_quote "\00AB"] - [double_right_angle_quote "\00BB"] - [single_left_quote "\2018"] - [single_right_quote "\2019"] - [double_left_quote "\201C"] - [double_right_quote "\201D"] - [low_double_quote "\201E"]] - [(def: .public quote - (-> Text Quote) - (|>> abstraction))]) + (enumeration + Quote + Text + quote_text + [[double_quote "\0022"] + [single_quote "\0027"] + [single_left_angle_quote "\2039"] + [single_right_angle_quote "\203A"] + [double_left_angle_quote "\00AB"] + [double_right_angle_quote "\00BB"] + [single_left_quote "\2018"] + [single_right_quote "\2019"] + [double_left_quote "\201C"] + [double_right_quote "\201D"] + [low_double_quote "\201E"]] + [(def: .public quote + (-> Text Quote) + (|>> abstraction))]) (def: quote_separator " ") |