diff options
Diffstat (limited to 'stdlib/source/lux/data/format/css/value.lux')
-rw-r--r-- | stdlib/source/lux/data/format/css/value.lux | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/stdlib/source/lux/data/format/css/value.lux b/stdlib/source/lux/data/format/css/value.lux index 9d34d02f6..08889f2e4 100644 --- a/stdlib/source/lux/data/format/css/value.lux +++ b/stdlib/source/lux/data/format/css/value.lux @@ -10,7 +10,7 @@ [number ["." rev]] ["." text - format] + ["%" format (#+ Format format)]] [collection ["." list ("#;." functor)]]] [type @@ -54,7 +54,7 @@ (def: (%number value) (Format Frac) - (let [raw (%f value)] + (let [raw (%.frac value)] (if (f/< +0.0 value) raw (|> raw (text.split 1) maybe.assume product.right)))) @@ -795,7 +795,7 @@ (def: #export (steps intervals step) (-> Nat Step (Value Timing)) - (..apply "steps" (list (%n intervals) (..step step)))) + (..apply "steps" (list (%.nat intervals) (..step step)))) (def: #export (cubic-bezier p0 p1 p2 p3) (-> Frac Frac Frac Frac (Value Timing)) @@ -806,7 +806,7 @@ (template [<name> <brand>] [(def: #export <name> (-> Nat (Value <brand>)) - (|>> %n :abstraction))] + (|>> %.nat :abstraction))] [iteration Iteration] [count Count] @@ -821,20 +821,20 @@ (def: #export (rgb color) (-> color.Color (Value Color)) (let [[red green blue] (color.to-rgb color)] - (..apply "rgb" (list (%n red) - (%n green) - (%n blue))))) + (..apply "rgb" (list (%.nat red) + (%.nat green) + (%.nat blue))))) (def: #export (rgba pigment) (-> color.Pigment (Value Color)) (let [(^slots [#color.color #color.alpha]) pigment [red green blue] (color.to-rgb color)] - (..apply "rgba" (list (%n red) - (%n green) - (%n blue) + (..apply "rgba" (list (%.nat red) + (%.nat green) + (%.nat blue) (if (r/= (:: rev.interval top) alpha) "1.0" - (format "0" (%r alpha))))))) + (format "0" (%.rev alpha))))))) (template [<name> <suffix>] [(def: #export (<name> value) @@ -862,15 +862,15 @@ (def: (%int value) (Format Int) (if (i/< +0 value) - (%i value) - (%n (.nat value)))) + (%.int value) + (%.nat (.nat value)))) (template [<name> <suffix>] [(def: #export (<name> value) (-> Int (Value Time)) (:abstraction (format (if (i/< +0 value) - (%i value) - (%n (.nat value))) + (%.int value) + (%.nat (.nat value))) <suffix>)))] @@ -886,8 +886,8 @@ (def: #export (slice-number/2 horizontal vertical) (-> Nat Nat (Value Slice)) - (:abstraction (format (%n horizontal) ..slice-separator - (%n vertical)))) + (:abstraction (format (%.nat horizontal) ..slice-separator + (%.nat vertical)))) (abstract: #export Stop {} @@ -943,13 +943,13 @@ (def: #export (turn value) (-> Rev Angle) - (:abstraction (format (%r value) "turn"))) + (:abstraction (format (%.rev value) "turn"))) (def: degree-limit Nat 360) (def: #export (degree value) (-> Nat Angle) - (:abstraction (format (%n (n/% ..degree-limit value)) "deg"))) + (:abstraction (format (%.nat (n/% ..degree-limit value)) "deg"))) (template [<degree> <name>] [(def: #export <name> Angle (..degree <degree>))] @@ -986,7 +986,7 @@ (def: #export (%% value) (-> Nat Percentage) - (:abstraction (format (%n (n/% percentage-limit value)) "%"))) + (:abstraction (format (%.nat (n/% percentage-limit value)) "%"))) (def: #export slice-percent/1 (-> Percentage (Value Slice)) @@ -1059,7 +1059,7 @@ (def: #export image (-> URL (Value Image)) - (|>> %t + (|>> %.text (list) (..apply "url"))) @@ -1139,7 +1139,7 @@ (def: #export text (-> Text (Value Content)) - (|>> %t :abstraction)) + (|>> %.text :abstraction)) (def: #export attribute (-> Label (Value Content)) @@ -1158,7 +1158,7 @@ [monospace "monospace"]] [(def: #export font (-> Text Font) - (|>> %t :abstraction)) + (|>> %.text :abstraction)) (def: #export (font-family options) (-> (List Font) (Value Font)) @@ -1195,7 +1195,7 @@ (def: #export grid-span (-> Nat (Value Grid-Span)) - (|>> %n (format "span ") :abstraction)) + (|>> %.nat (format "span ") :abstraction)) (def: grid-column-separator " ") (def: grid-row-separator " ") @@ -1213,11 +1213,11 @@ (def: #export (resolution dpi) (-> Nat (Value Resolution)) - (:abstraction (format (%n dpi) "dpi"))) + (:abstraction (format (%.nat dpi) "dpi"))) (def: #export (ratio numerator denominator) (-> Nat Nat (Value Ratio)) - (:abstraction (format (%n numerator) "/" (%n denominator)))) + (:abstraction (format (%.nat numerator) "/" (%.nat denominator)))) (enumeration: Quote Text quote-text @@ -1241,7 +1241,7 @@ (def: #export (quotes [left0 right0] [left1 right1]) (-> [Quote Quote] [Quote Quote] (Value Quotes)) (|> (list left0 right0 left1 right1) - (list;map (|>> ..quote-text %t)) + (list;map (|>> ..quote-text %.text)) (text.join-with ..quote-separator) :abstraction)) @@ -1328,8 +1328,8 @@ (def: #export (z-index index) (-> Int (Value Z-Index)) (:abstraction (if (i/< +0 index) - (%i index) - (%n (.nat index))))) + (%.int index) + (%.nat (.nat index))))) (multi: multi-image Image ",") (multi: multi-shadow Shadow ",") |