aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/css.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/format/css.lux')
-rw-r--r--stdlib/source/library/lux/data/format/css.lux27
1 files changed, 14 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux
index 75e886e0d..57a7d33de 100644
--- a/stdlib/source/library/lux/data/format/css.lux
+++ b/stdlib/source/library/lux/data/format/css.lux
@@ -65,8 +65,8 @@
["font-style" (|> font (value@ #/font.style) (maybe.else /value.normal_style) /value.value)]
["font-weight" (|> font (value@ #/font.weight) (maybe.else /value.normal_weight) /value.value)]
with_unicode)
- (list\map (function (_ [property value])
- (format property ": " value ";")))
+ (list\each (function (_ [property value])
+ (format property ": " value ";")))
(text.interposed /style.separator)
(text.enclosed ["{" "}"])
(format "@font-face")
@@ -87,41 +87,42 @@
text.new_line)
(type: .public Frame
- {#when Percentage
- #what Style})
+ (Record
+ {#when Percentage
+ #what Style}))
(def: .public (key_frames animation frames)
(-> (Value Animation) (List Frame) (CSS Special))
(:abstraction (format "@keyframes " (/value.value animation) " {"
(|> frames
- (list\map (function (_ frame)
- (format (/value.percentage (value@ #when frame)) " {"
- (/style.inline (value@ #what frame))
- "}")))
+ (list\each (function (_ frame)
+ (format (/value.percentage (value@ #when frame)) " {"
+ (/style.inline (value@ #what frame))
+ "}")))
(text.interposed ..css_separator))
"}")))
- (template: (!compose <pre> <post>)
+ (template: (!composite <pre> <post>)
(:abstraction (format (:representation <pre>) ..css_separator
(:representation <post>))))
(def: .public (and pre post)
(-> (CSS Any) (CSS Any) (CSS Any))
- (!compose pre post))
+ (!composite pre post))
(def: .public (alter combinator selector css)
(-> Combinator (Selector Any) (CSS Common) (CSS Common))
(|> css
:representation
(text.all_split_by ..css_separator)
- (list\map (|>> (format (/selector.selector (|> selector (combinator (/selector.tag "")))))))
+ (list\each (|>> (format (/selector.selector (|> selector (combinator (/selector.tag "")))))))
(text.interposed ..css_separator)
:abstraction))
(def: .public (dependent combinator selector style inner)
(-> Combinator (Selector Any) Style (CSS Common) (CSS Common))
- (!compose (..rule selector style)
- (..alter combinator selector inner)))
+ (!composite (..rule selector style)
+ (..alter combinator selector inner)))
(template [<name> <combinator>]
[(def: .public <name>