aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/css/value.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/format/css/value.lux')
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux750
1 files changed, 375 insertions, 375 deletions
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index f85272a04..5c6e575ed 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -28,8 +28,8 @@
[//
[selector (#+ Label)]])
-(syntax: (text-identifier {identifier s.text})
- (wrap (list (code.local-identifier identifier))))
+(syntax: (text_identifier {identifier s.text})
+ (wrap (list (code.local_identifier (text.replace_all "-" "_" identifier)))))
(template: (enumeration: <abstraction> <representation> <out> <sample>+ <definition>+)
(abstract: #export <abstraction>
@@ -42,10 +42,10 @@
(`` (template [<name> <value>]
[(def: #export <name> <abstraction> (:abstraction <value>))]
- (~~ (template.splice <sample>+))
+ (~~ (template.spliced <sample>+))
))
- (template.splice <definition>+)))
+ (template.spliced <definition>+)))
(template: (multi: <multi> <type> <separator>)
(def: #export (<multi> pre post)
@@ -84,11 +84,11 @@
(Value <brand>)
(:abstraction <value>))]
- (~~ (template.splice <alias>+))))
+ (~~ (template.spliced <alias>+))))
- (with-expansions [<rows> (template.splice <value>+)]
+ (with_expansions [<rows> (template.spliced <value>+)]
(template [<value>]
- [(`` (def: #export (~~ (text-identifier <value>))
+ [(`` (def: #export (~~ (..text_identifier <value>))
(Value <brand>)
(:abstraction <value>)))]
@@ -117,11 +117,11 @@
["thick"]]]
[Slice
- [[full-slice "fill"]]
+ [[full_slice "fill"]]
[]]
[Alignment
- [[auto-alignment "auto"]]
+ [[auto_alignment "auto"]]
[["stretch"]
["center"]
["flex-start"]
@@ -134,24 +134,24 @@
[]
[]]
- [Animation-Direction
- [[normal-direction "normal"]]
+ [Animation_Direction
+ [[normal_direction "normal"]]
[["reverse"]
["alternate"]
["alternate-reverse"]]]
- [Animation-Fill
- [[fill-forwards "forwards"]
- [fill-backwards "backwards"]
- [fill-both "both"]]
+ [Animation_Fill
+ [[fill_forwards "forwards"]
+ [fill_backwards "backwards"]
+ [fill_both "both"]]
[]]
- [Column-Fill
+ [Column_Fill
[]
[["balance"]
["auto"]]]
- [Column-Span
+ [Column_Span
[]
[["all"]]]
@@ -180,17 +180,17 @@
[Visibility
[[invisible "hidden"]
- [collapse-visibility "collapse"]]
+ [collapse_visibility "collapse"]]
[["visible"]]]
[Attachment
- [[scroll-attachment "scroll"]
- [fixed-attachment "fixed"]
- [local-attachment "local"]]
+ [[scroll_attachment "scroll"]
+ [fixed_attachment "fixed"]
+ [local_attachment "local"]]
[]]
[Blend
- [[normal-blend "normal"]]
+ [[normal_blend "normal"]]
[["multiply"]
["screen"]
["overlay"]
@@ -212,11 +212,11 @@
["content-box"]]]
[Image
- [[no-image "none"]]
+ [[no_image "none"]]
[]]
[Repeat
- [[stretch-repeat "stretch"]]
+ [[stretch_repeat "stretch"]]
[["repeat"]
["repeat-x"]
["repeat-y"]
@@ -225,19 +225,19 @@
["round"]]]
[Location
- [[left-top "left top"]
- [left-center "left center"]
- [left-bottom "left bottom"]
- [right-top "right top"]
- [right-center "right center"]
- [right-bottom "right bottom"]
- [center-top "center top"]
- [center-center "center center"]
- [center-bottom "center bottom"]]
+ [[left_top "left top"]
+ [left_center "left center"]
+ [left_bottom "left bottom"]
+ [right_top "right top"]
+ [right_center "right center"]
+ [right_bottom "right bottom"]
+ [center_top "center top"]
+ [center_center "center center"]
+ [center_bottom "center bottom"]]
[]]
[Fit
- [[no-fit "none"]]
+ [[no_fit "none"]]
[["fill"]
["cover"]
["contain"]
@@ -260,7 +260,7 @@
[["separate"]
["collapse"]]]
- [Box-Decoration-Break
+ [Box_Decoration_Break
[]
[["slice"]
["clone"]]]
@@ -271,14 +271,14 @@
["bottom"]]]
[Float
- [[float-left "left"]
- [float-right "right"]]
+ [[float_left "left"]
+ [float_right "right"]]
[]]
[Clear
- [[clear-left "left"]
- [clear-right "right"]
- [clear-both "both"]]
+ [[clear_left "left"]
+ [clear_right "right"]
+ [clear_both "both"]]
[]]
[Counter
@@ -293,8 +293,8 @@
["no-close-quote"]]]
[Cursor
- [[horizontal-text "text"]
- [no-cursor "none"]]
+ [[horizontal_text "text"]
+ [no_cursor "none"]]
[["alias"]
["all-scroll"]
["cell"]
@@ -337,14 +337,14 @@
[]
[]]
- [Text-Direction
- [[left-to-right "ltr"]
- [right-to-left "rtl"]]
+ [Text_Direction
+ [[left_to_right "ltr"]
+ [right_to_left "rtl"]]
[]]
[Display
- [[grid-display "grid"]
- [no-display "none"]]
+ [[grid_display "grid"]
+ [no_display "none"]]
[["inline"]
["block"]
["contents"]
@@ -374,38 +374,38 @@
[]
[]]
- [Flex-Direction
+ [Flex_Direction
[]
[["row"]
["row-reverse"]
["column"]
["column-reverse"]]]
- [Flex-Wrap
- [[no-wrap "nowrap"]]
+ [Flex_Wrap
+ [[no_wrap "nowrap"]]
[["wrap"]
- ["wrap-reverse"]]]
+ ["wrap_reverse"]]]
- [Font-Kerning
- [[auto-kerning "auto"]
- [normal-kerning "normal"]
- [no-kerning "none"]]
+ [Font_Kerning
+ [[auto_kerning "auto"]
+ [normal_kerning "normal"]
+ [no_kerning "none"]]
[]]
- [Font-Size
- [[medium-size "medium"]
- [xx-small-size "xx-small"]
- [x-small-size "x-small"]
- [small-size "small"]
- [large-size "large"]
- [x-large-size "x-large"]
- [xx-large-size "xx-large"]
- [smaller-size "smaller"]
- [larger-size "larger"]]
+ [Font_Size
+ [[medium_size "medium"]
+ [xx_small_size "xx-small"]
+ [x_small_size "x-small"]
+ [small_size "small"]
+ [large_size "large"]
+ [x_large_size "x-large"]
+ [xx_large_size "xx-large"]
+ [smaller_size "smaller"]
+ [larger_size "larger"]]
[]]
- [Font-Stretch
- [[normal-stretch "normal"]]
+ [Font_Stretch
+ [[normal_stretch "normal"]]
[["condensed"]
["ultra-condensed"]
["extra-condensed"]
@@ -415,64 +415,64 @@
["extra-expanded"]
["ultra-expanded"]]]
- [Font-Style
- [[normal-style "normal"]]
+ [Font_Style
+ [[normal_style "normal"]]
[["italic"]
["oblique"]]]
- [Font-Weight
- [[normal-weight "normal"]
- [weight-100 "100"]
- [weight-200 "200"]
- [weight-300 "300"]
- [weight-400 "400"]
- [weight-500 "500"]
- [weight-600 "600"]
- [weight-700 "700"]
- [weight-800 "800"]
- [weight-900 "900"]]
+ [Font_Weight
+ [[normal_weight "normal"]
+ [weight_100 "100"]
+ [weight_200 "200"]
+ [weight_300 "300"]
+ [weight_400 "400"]
+ [weight_500 "500"]
+ [weight_600 "600"]
+ [weight_700 "700"]
+ [weight_800 "800"]
+ [weight_900 "900"]]
[["bold"]]]
- [Font-Variant
- [[normal-font "normal"]]
+ [Font_Variant
+ [[normal_font "normal"]]
[["small-caps"]]]
[Grid
[]
[]]
- [Grid-Content
- [[auto-content "auto"]]
+ [Grid_Content
+ [[auto_content "auto"]]
[["max-content"]
["min-content"]]]
- [Grid-Flow
- [[row-flow "row"]
- [column-flow "column"]
- [dense-flow "dense"]
- [row-dense-flow "row dense"]
- [column-dense-flow "column dense"]]
+ [Grid_Flow
+ [[row_flow "row"]
+ [column_flow "column"]
+ [dense_flow "dense"]
+ [row_dense_flow "row dense"]
+ [column_dense_flow "column dense"]]
[]]
- [Grid-Span
- [[auto-span "auto"]]
+ [Grid_Span
+ [[auto_span "auto"]]
[]]
- [Grid-Template
+ [Grid_Template
[]
[]]
- [Hanging-Punctuation
- [[no-hanging-punctuation "none"]]
+ [Hanging_Punctuation
+ [[no_hanging_punctuation "none"]]
[["first"]
["last"]
["allow-end"]
["force-end"]]]
[Hyphens
- [[no-hyphens "none"]
- [manual-hyphens "manual"]
- [auto-hyphens "auto"]]
+ [[no_hyphens "none"]
+ [manual_hyphens "manual"]
+ [auto_hyphens "auto"]]
[]]
[Orientation
@@ -495,55 +495,55 @@
[]]
[Update
- [[no-update "none"]
- [slow-update "slow"]
- [fast-update "fast"]]
+ [[no_update "none"]
+ [slow_update "slow"]
+ [fast_update "fast"]]
[]]
- [Block-Overflow
- [[no-block-overflow "none"]
- [scroll-block-overflow "scroll"]
- [optional-paged-block-overflow "optional-paged"]
- [paged-block-overflow "paged"]]
+ [Block_Overflow
+ [[no_block_overflow "none"]
+ [scroll_block_overflow "scroll"]
+ [optional_paged_block_overflow "optional-paged"]
+ [paged_block_overflow "paged"]]
[]]
- [Inline-Overflow
- [[no-inline-overflow "none"]
- [scroll-inline-overflow "scroll"]]
+ [Inline_Overflow
+ [[no_inline_overflow "none"]
+ [scroll_inline_overflow "scroll"]]
[]]
- [Display-Mode
+ [Display_Mode
[]
[["fullscreen"]
["standalone"]
["minimal-ui"]
["browser"]]]
- [Color-Gamut
+ [Color_Gamut
[]
[["srgb"]
["p3"]
["rec2020"]]]
- [Inverted-Colors
- [[no-inverted-colors "none"]
- [inverted-colors "inverted"]]
+ [Inverted_Colors
+ [[no_inverted_colors "none"]
+ [inverted_colors "inverted"]]
[]]
[Pointer
- [[no-pointer "none"]
- [coarse-pointer "coarse"]
- [fine-pointer "fine"]]
+ [[no_pointer "none"]
+ [coarse_pointer "coarse"]
+ [fine_pointer "fine"]]
[]]
[Hover
- [[no-hover "none"]]
+ [[no_hover "none"]]
[["hover"]]]
[Light
- [[dim-light "dim"]
- [normal-light "normal"]
- [washed-light "washed"]]
+ [[dim_light "dim"]
+ [normal_light "normal"]
+ [washed_light "washed"]]
[]]
[Ratio
@@ -551,33 +551,33 @@
[]]
[Scripting
- [[no-scripting "none"]
- [initial-scripting-only "initial-only"]
- [scripting-enabled "enabled"]]
+ [[no_scripting "none"]
+ [initial_scripting_only "initial-only"]
+ [scripting_enabled "enabled"]]
[]]
[Motion
- [[no-motion-preference "no-preference"]
- [reduced-motion "reduce"]]
+ [[no_motion_preference "no-preference"]
+ [reduced_motion "reduce"]]
[]]
- [Color-Scheme
- [[no-color-scheme-preference "no-preference"]
- [light-color-scheme "light"]
- [dark-color-scheme "dark"]]
+ [Color_Scheme
+ [[no_color_scheme_preference "no-preference"]
+ [light_color_scheme "light"]
+ [dark_color_scheme "dark"]]
[]]
[Isolation
- [[auto-isolation "auto"]]
+ [[auto_isolation "auto"]]
[["isolate"]]]
- [List-Style-Position
+ [List_Style_Position
[]
[["inside"]
["outside"]]]
- [List-Style-Type
- [[no-list-style "none"]]
+ [List_Style_Type
+ [[no_list_style "none"]]
[["disc"]
["armenian"]
["circle"]
@@ -605,23 +605,23 @@
[]]
[Overflow
- [[visible-overflow "visible"]
- [hidden-overflow "hidden"]
- [scroll-overflow "scroll"]
- [auto-overflow "auto"]]
+ [[visible_overflow "visible"]
+ [hidden_overflow "hidden"]
+ [scroll_overflow "scroll"]
+ [auto_overflow "auto"]]
[]]
- [Page-Break
- [[auto-page-break "auto"]
- [always-page-break "always"]
- [avoid-page-break "avoid"]
- [left-page-break "left"]
- [right-page-break "right"]]
+ [Page_Break
+ [[auto_page_break "auto"]
+ [always_page_break "always"]
+ [avoid_page_break "avoid"]
+ [left_page_break "left"]
+ [right_page_break "right"]]
[]]
- [Pointer-Events
- [[auto-pointer-events "auto"]
- [no-pointer-events "none"]]
+ [Pointer_Events
+ [[auto_pointer_events "auto"]
+ [no_pointer_events "none"]]
[]]
[Position
@@ -633,156 +633,156 @@
["sticky"]]]
[Quotes
- [[no-quotes "none"]]
+ [[no_quotes "none"]]
[]]
[Resize
- [[resize-none "none"]
- [resize-both "both"]
- [resize-horizontal "horizontal"]
- [resize-vertical "vertical"]]
+ [[resize_none "none"]
+ [resize_both "both"]
+ [resize_horizontal "horizontal"]
+ [resize_vertical "vertical"]]
[]]
- [Scroll-Behavior
- [[auto-scroll-behavior "auto"]
- [smooth-scroll-behavior "smooth"]]
+ [Scroll_Behavior
+ [[auto_scroll_behavior "auto"]
+ [smooth_scroll_behavior "smooth"]]
[]]
- [Table-Layout
- [[auto-table-layout "auto"]
- [fixed-table-layout "fixed"]]
+ [Table_Layout
+ [[auto_table_layout "auto"]
+ [fixed_table_layout "fixed"]]
[]]
- [Text-Align
- [[left-text-align "left"]
- [right-text-align "right"]
- [center-text-align "center"]
- [justify-text-align "justify"]]
+ [Text_Align
+ [[left_text_align "left"]
+ [right_text_align "right"]
+ [center_text_align "center"]
+ [justify_text_align "justify"]]
[]]
- [Text-Align-Last
- [[auto-text-align-last "auto"]
- [left-text-align-last "left"]
- [right-text-align-last "right"]
- [center-text-align-last "center"]
- [justify-text-align-last "justify"]
- [start-text-align-last "start"]
- [end-text-align-last "end"]]
+ [Text_Align_Last
+ [[auto_text_align_last "auto"]
+ [left_text_align_last "left"]
+ [right_text_align_last "right"]
+ [center_text_align_last "center"]
+ [justify_text_align_last "justify"]
+ [start_text_align_last "start"]
+ [end_text_align_last "end"]]
[]]
- [Text-Decoration-Line
- [[no-text-decoration-line "none"]
- [underline-text-decoration-line "underline"]
- [overline-text-decoration-line "overline"]
- [line-through-text-decoration-line "line-through"]]
+ [Text_Decoration_Line
+ [[no_text_decoration_line "none"]
+ [underline_text_decoration_line "underline"]
+ [overline_text_decoration_line "overline"]
+ [line_through_text_decoration_line "line-through"]]
[]]
- [Text-Decoration-Style
- [[solid-text-decoration-style "solid"]
- [double-text-decoration-style "double"]
- [dotted-text-decoration-style "dotted"]
- [dashed-text-decoration-style "dashed"]
- [wavy-text-decoration-style "wavy"]]
+ [Text_Decoration_Style
+ [[solid_text_decoration_style "solid"]
+ [double_text_decoration_style "double"]
+ [dotted_text_decoration_style "dotted"]
+ [dashed_text_decoration_style "dashed"]
+ [wavy_text_decoration_style "wavy"]]
[]]
- [Text-Justification
- [[auto-text-justification "auto"]
- [inter-word-text-justification "inter-word"]
- [inter-character-text-justification "inter-character"]
- [no-text-justification "none"]]
+ [Text_Justification
+ [[auto_text_justification "auto"]
+ [inter_word_text_justification "inter-word"]
+ [inter_character_text_justification "inter-character"]
+ [no_text_justification "none"]]
[]]
- [Text-Overflow
- [[clip-text-overflow "clip"]
- [ellipsis-text-overflow "ellipsis"]]
+ [Text_Overflow
+ [[clip_text_overflow "clip"]
+ [ellipsis_text_overflow "ellipsis"]]
[]]
- [Text-Transform
- [[no-text-transform "none"]]
+ [Text_Transform
+ [[no_text_transform "none"]]
[["capitalize"]
["uppercase"]
["lowercase"]]]
[Transform
- [[no-transform "none"]]
+ [[no_transform "none"]]
[]]
- [Transform-Origin
+ [Transform_Origin
[]
[]]
- [Transform-Style
+ [Transform_Style
[]
[["flat"]
- ["preserve-3d"]]]
+ ["preserve_3d"]]]
[Transition
- [[transition-none "none"]
- [transition-all "all"]]
+ [[transition_none "none"]
+ [transition_all "all"]]
[]]
[Bidi
- [[bidi-normal "normal"]
- [bidi-embed "embed"]
- [bidi-isolate "isolate"]
- [bidi-isolate-override "isolate-override"]
- [bidi-plaintext "plaintext"]]
+ [[bidi_normal "normal"]
+ [bidi_embed "embed"]
+ [bidi_isolate "isolate"]
+ [bidi_isolate_override "isolate-override"]
+ [bidi_plaintext "plaintext"]]
[["bidi-override"]]]
- [User-Select
- [[user-select-auto "auto"]
- [user-select-none "none"]
- [user-select-text "text"]
- [user-select-all "all"]]
+ [User_Select
+ [[user_select_auto "auto"]
+ [user_select_none "none"]
+ [user_select_text "text"]
+ [user_select_all "all"]]
[]]
- [Vertical-Align
- [[vertical-align-baseline "baseline"]
- [vertical-align-sub "sub"]
- [vertical-align-super "super"]
- [vertical-align-top "top"]
- [vertical-align-text-top "text-top"]
- [vertical-align-middle "middle"]
- [vertical-align-bottom "bottom"]
- [vertical-align-text-bottom "text-bottom"]]
+ [Vertical_Align
+ [[vertical_align_baseline "baseline"]
+ [vertical_align_sub "sub"]
+ [vertical_align_super "super"]
+ [vertical_align_top "top"]
+ [vertical_align_text_top "text-top"]
+ [vertical_align_middle "middle"]
+ [vertical_align_bottom "bottom"]
+ [vertical_align_text_bottom "text-bottom"]]
[]]
- [White-Space
- [[normal-white-space "normal"]
- [no-wrap-white-space "nowrap"]
- [pre-white-space "pre"]
- [pre-line-white-space "pre-line"]
- [pre-wrap-white-space "pre-wrap"]]
+ [White_Space
+ [[normal_white_space "normal"]
+ [no_wrap_white_space "nowrap"]
+ [pre_white_space "pre"]
+ [pre_line_white_space "pre-line"]
+ [pre_wrap_white_space "pre-wrap"]]
[]]
- [Word-Break
- [[normal-word-break "normal"]]
+ [Word_Break
+ [[normal_word_break "normal"]]
[["break-all"]
["keep-all"]
["break-word"]]]
- [Word-Wrap
- [[normal-word-wrap "normal"]
- [break-word-word-wrap "break-word"]]
+ [Word_Wrap
+ [[normal_word_wrap "normal"]
+ [break_word_word_wrap "break-word"]]
[]]
- [Writing-Mode
- [[top-to-bottom-writing-mode "horizontal-tb"]
- [left-to-right-writing-mode "vertical-rl"]
- [right-to-left-writing-mode "vertical-lr"]]
+ [Writing_Mode
+ [[top_to_bottom_writing_mode "horizontal-tb"]
+ [left_to_right_writing_mode "vertical-rl"]
+ [right_to_left_writing_mode "vertical-lr"]]
[]]
- [Z-Index
+ [Z_Index
[]
[]]
)
- (def: value-separator ",")
+ (def: value_separator ",")
(def: (apply name inputs)
(-> Text (List Text) Value)
(|> inputs
- (text.join-with ..value-separator)
+ (text.join_with ..value_separator)
(text.enclose ["(" ")"])
(format name)
:abstraction))
@@ -797,7 +797,7 @@
(-> Nat Step (Value Timing))
(..apply "steps" (list (%.nat intervals) (..step step))))
- (def: #export (cubic-bezier p0 p1 p2 p3)
+ (def: #export (cubic_bezier p0 p1 p2 p3)
(-> Frac Frac Frac Frac (Value Timing))
(|> (list p0 p1 p2 p3)
(list\map %number)
@@ -810,8 +810,8 @@
[iteration Iteration]
[count Count]
- [slice-number/1 Slice]
- [span-line Grid-Span]
+ [slice_number/1 Slice]
+ [span_line Grid_Span]
)
(def: #export animation
@@ -820,7 +820,7 @@
(def: #export (rgb color)
(-> color.Color (Value Color))
- (let [[red green blue] (color.to-rgb color)]
+ (let [[red green blue] (color.to_rgb color)]
(..apply "rgb" (list (%.nat red)
(%.nat green)
(%.nat blue)))))
@@ -828,7 +828,7 @@
(def: #export (rgba pigment)
(-> color.Pigment (Value Color))
(let [(^slots [#color.color #color.alpha]) pigment
- [red green blue] (color.to-rgb color)]
+ [red green blue] (color.to_rgb color)]
(..apply "rgba" (list (%.nat red)
(%.nat green)
(%.nat blue)
@@ -875,18 +875,18 @@
[seconds "s"]
- [milli-seconds "ms"]
+ [milli_seconds "ms"]
)
(def: #export thickness
(-> (Value Length) (Value Thickness))
(|>> :transmutation))
- (def: slice-separator " ")
+ (def: slice_separator " ")
- (def: #export (slice-number/2 horizontal vertical)
+ (def: #export (slice_number/2 horizontal vertical)
(-> Nat Nat (Value Slice))
- (:abstraction (format (%.nat horizontal) ..slice-separator
+ (:abstraction (format (%.nat horizontal) ..slice_separator
(%.nat vertical))))
(abstract: #export Stop
@@ -896,17 +896,17 @@
(-> (Value Color) Stop)
(|>> (:representation Value) (:abstraction Stop)))
- (def: stop-separator " ")
+ (def: stop_separator " ")
- (def: #export (single-stop length color)
+ (def: #export (single_stop length color)
(-> (Value Length) (Value Color) Stop)
- (:abstraction (format (:representation Value color) ..stop-separator
+ (:abstraction (format (:representation Value color) ..stop_separator
(:representation Value length))))
- (def: #export (double-stop start end color)
+ (def: #export (double_stop start end color)
(-> (Value Length) (Value Length) (Value Color) Stop)
- (:abstraction (format (:representation Value color) ..stop-separator
- (:representation Value start) ..stop-separator
+ (:abstraction (format (:representation Value color) ..stop_separator
+ (:representation Value start) ..stop_separator
(:representation Value end))))
(abstract: #export Hint
@@ -916,14 +916,14 @@
(-> (Value Length) Hint)
(|>> (:representation Value) (:abstraction Hint)))
- (def: (with-hint [hint stop])
+ (def: (with_hint [hint stop])
(-> [(Maybe Hint) Stop] Text)
(case hint
#.None
(:representation Stop stop)
(#.Some hint)
- (format (:representation Hint hint) ..value-separator (:representation Stop stop))))))
+ (format (:representation Hint hint) ..value_separator (:representation Stop stop))))))
(type: #export (List/1 a)
[a (List a)])
@@ -939,19 +939,19 @@
(-> Rev Angle)
(:abstraction (format (%.rev value) "turn")))
- (def: degree-limit Nat 360)
+ (def: degree_limit Nat 360)
(def: #export (degree value)
(-> Nat Angle)
- (:abstraction (format (%.nat (n.% ..degree-limit value)) "deg")))
+ (:abstraction (format (%.nat (n.% ..degree_limit value)) "deg")))
(template [<degree> <name>]
[(def: #export <name> Angle (..degree <degree>))]
- [000 to-top]
- [090 to-right]
- [180 to-bottom]
- [270 to-left]
+ [000 to_top]
+ [090 to_right]
+ [180 to_bottom]
+ [270 to_left]
)
(template [<name> <function>]
@@ -959,11 +959,11 @@
(-> Angle Stop (List/1 [(Maybe Hint) Stop]) (Value Image))
(let [[now after] next]
(..apply <function> (list& (:representation Angle angle)
- (with-hint now)
- (list\map with-hint after)))))]
+ (with_hint now)
+ (list\map with_hint after)))))]
- [linear-gradient "linear-gradient"]
- [repeating-linear-gradient "repeating-linear-gradient"]
+ [linear_gradient "linear-gradient"]
+ [repeating_linear_gradient "repeating-linear-gradient"]
)
)
@@ -974,19 +974,19 @@
(-> Percentage Text)
(|>> :representation))
- (def: percentage-limit Nat (.inc 100))
+ (def: percentage_limit Nat (.inc 100))
(def: #export (%% value)
(-> Nat Percentage)
- (:abstraction (format (%.nat (n.% percentage-limit value)) "%")))
+ (:abstraction (format (%.nat (n.% percentage_limit value)) "%")))
- (def: #export slice-percent/1
+ (def: #export slice_percent/1
(-> Percentage (Value Slice))
(|>> :representation (:abstraction Value)))
- (def: #export (slice-percent/2 horizontal vertical)
+ (def: #export (slice_percent/2 horizontal vertical)
(-> Percentage Percentage (Value Slice))
- (:abstraction Value (format (:representation horizontal) ..slice-separator
+ (:abstraction Value (format (:representation horizontal) ..slice_separator
(:representation vertical))))
(template [<input> <pre> <function>+]
@@ -995,12 +995,12 @@
(-> <input> (Value Filter))
(|>> <pre> (list) (..apply <function>)))]
- (~~ (template.splice <function>+))))]
+ (~~ (template.spliced <function>+))))]
[Nat (<| (:representation Value) ..px n.frac)
[[blur "blur"]]]
[Nat (<| ..angle ..degree)
- [[hue-rotate "hue-rotate"]]]
+ [[hue_rotate "hue-rotate"]]]
[Percentage (:representation Percentage)
[[brightness "brightness"]
[contrast "contrast"]
@@ -1012,33 +1012,33 @@
)
)
- (def: #export svg-filter
+ (def: #export svg_filter
(-> URL (Value Filter))
(|>> (list) (..apply "url")))
- (def: default-shadow-length (px +0.0))
+ (def: default_shadow_length (px +0.0))
- (def: #export (drop-shadow horizontal vertical blur spread color)
+ (def: #export (drop_shadow horizontal vertical blur spread color)
(-> (Value Length) (Value Length)
(Maybe (Value Length)) (Maybe (Value Length))
(Value Color)
(Value Filter))
(|> (list (:representation horizontal)
(:representation vertical)
- (|> blur (maybe.default ..default-shadow-length) :representation)
- (|> spread (maybe.default ..default-shadow-length) :representation)
+ (|> blur (maybe.default ..default_shadow_length) :representation)
+ (|> spread (maybe.default ..default_shadow_length) :representation)
(:representation color))
- (text.join-with " ")
+ (text.join_with " ")
(list)
(..apply "drop-shadow")))
- (def: length-separator " ")
+ (def: length_separator " ")
(template [<name> <type>]
[(def: #export (<name> horizontal vertical)
(-> (Value Length) (Value Length) (Value <type>))
(:abstraction (format (:representation horizontal)
- ..length-separator
+ ..length_separator
(:representation vertical))))]
[location Location]
@@ -1057,16 +1057,16 @@
(enumeration: Shape Text
shape
- [[ellipse-shape "ellipse"]
- [circle-shape "circle"]]
+ [[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"]]
+ [[closest_side "closest-side"]
+ [closest_corner "closest-corner"]
+ [farthest_side "farthest-side"]
+ [farthest_corner "farthest-corner"]]
[])
(template [<name> <function>]
@@ -1074,21 +1074,21 @@
(-> Shape (Maybe Extent) (Value Location)
Stop (List/1 [(Maybe Hint) Stop])
(Value Image))
- (let [after-extent (format "at " (:representation location))
- with-extent (case extent
+ (let [after_extent (format "at " (:representation location))
+ with_extent (case extent
(#.Some extent)
- (format (..extent extent) " " after-extent)
+ (format (..extent extent) " " after_extent)
#.None
- after-extent)
- where (format (..shape shape) " " with-extent)
+ after_extent)
+ where (format (..shape shape) " " with_extent)
[now after] next]
(..apply <function> (list& (..shape shape)
- (with-hint now)
- (list\map with-hint after)))))]
+ (with_hint now)
+ (list\map with_hint after)))))]
- [radial-gradient "radial-gradient"]
- [repeating-radial-gradient "repeating-radial-gradient"]
+ [radial_gradient "radial-gradient"]
+ [repeating_radial_gradient "repeating-radial-gradient"]
)
(def: #export (shadow horizontal vertical blur spread color inset?)
@@ -1096,16 +1096,16 @@
(Maybe (Value Length)) (Maybe (Value Length))
(Value Color) Bit
(Value Shadow))
- (let [with-inset (if inset?
+ (let [with_inset (if inset?
(list "inset")
(list))]
(|> (list& (:representation horizontal)
(:representation vertical)
- (|> blur (maybe.default ..default-shadow-length) :representation)
- (|> spread (maybe.default ..default-shadow-length) :representation)
+ (|> blur (maybe.default ..default_shadow_length) :representation)
+ (|> spread (maybe.default ..default_shadow_length) :representation)
(:representation color)
- with-inset)
- (text.join-with " ")
+ with_inset)
+ (text.join_with " ")
:abstraction)))
(type: #export Rectangle
@@ -1125,7 +1125,7 @@
(-> Label (Value Counter))
(|>> :abstraction))
- (def: #export current-count
+ (def: #export current_count
(-> (Value Counter) (Value Content))
(|>> :representation (list) (..apply "counter")))
@@ -1142,9 +1142,9 @@
(|>> (list) (..apply "url")))
(enumeration: Font Text
- font-name
+ font_name
[[serif "serif"]
- [sans-serif "sans-serif"]
+ [sans_serif "sans-serif"]
[cursive "cursive"]
[fantasy "fantasy"]
[monospace "monospace"]]
@@ -1152,20 +1152,20 @@
(-> Text Font)
(|>> %.text :abstraction))
- (def: #export (font-family options)
+ (def: #export (font_family options)
(-> (List Font) (Value Font))
(case options
(#.Cons _)
(|> options
- (list\map ..font-name)
- (text.join-with ",")
+ (list\map ..font_name)
+ (text.join_with ",")
(:abstraction Value))
#.Nil
..initial))])
- (def: #export font-size
- (-> (Value Length) (Value Font-Size))
+ (def: #export font_size
+ (-> (Value Length) (Value Font_Size))
(|>> :transmutation))
(def: #export number
@@ -1176,31 +1176,31 @@
(-> Label (Value Grid))
(|>> :abstraction))
- (def: #export fit-content
- (-> (Value Length) (Value Grid-Content))
+ (def: #export fit_content
+ (-> (Value Length) (Value Grid_Content))
(|>> :representation (list) (..apply "fit-content")))
- (def: #export (min-max min max)
- (-> (Value Grid-Content) (Value Grid-Content) (Value Grid-Content))
+ (def: #export (min_max min max)
+ (-> (Value Grid_Content) (Value Grid_Content) (Value Grid_Content))
(..apply "minmax" (list (:representation min)
(:representation max))))
- (def: #export grid-span
- (-> Nat (Value Grid-Span))
+ (def: #export grid_span
+ (-> Nat (Value Grid_Span))
(|>> %.nat (format "span ") :abstraction))
- (def: grid-column-separator " ")
- (def: grid-row-separator " ")
+ (def: grid_column_separator " ")
+ (def: grid_row_separator " ")
- (def: #export grid-template
- (-> (List (List (Maybe (Value Grid)))) (Value Grid-Template))
+ (def: #export grid_template
+ (-> (List (List (Maybe (Value Grid)))) (Value Grid_Template))
(let [empty (: (Value Grid)
(:abstraction "."))]
(|>> (list\map (|>> (list\map (|>> (maybe.default empty)
:representation))
- (text.join-with ..grid-column-separator)
+ (text.join_with ..grid_column_separator)
(text.enclose ["'" "'"])))
- (text.join-with ..grid-row-separator)
+ (text.join_with ..grid_row_separator)
:abstraction)))
(def: #export (resolution dpi)
@@ -1212,32 +1212,32 @@
(: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"]]
+ 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: #export quote
(-> Text Quote)
(|>> :abstraction))])
- (def: quote-separator " ")
+ (def: quote_separator " ")
(def: #export (quotes [left0 right0] [left1 right1])
(-> [Quote Quote] [Quote Quote] (Value Quotes))
(|> (list left0 right0 left1 right1)
- (list\map (|>> ..quote-text %.text))
- (text.join-with ..quote-separator)
+ (list\map (|>> ..quote_text %.text))
+ (text.join_with ..quote_separator)
:abstraction))
- (def: #export (matrix-2d [a b] [c d] [tx ty])
+ (def: #export (matrix_2d [a b] [c d] [tx ty])
(-> [Frac Frac]
[Frac Frac]
[Frac Frac]
@@ -1246,7 +1246,7 @@
(list\map %number)
(..apply "matrix")))
- (def: #export (matrix-3d [a0 b0 c0 d0] [a1 b1 c1 d1] [a2 b2 c2 d2] [a3 b3 c3 d3])
+ (def: #export (matrix_3d [a0 b0 c0 d0] [a1 b1 c1 d1] [a2 b2 c2 d2] [a3 b3 c3 d3])
(-> [Frac Frac Frac Frac]
[Frac Frac Frac Frac]
[Frac Frac Frac Frac]
@@ -1256,74 +1256,74 @@
(list\map %number)
(..apply "matrix3d")))
- (template [<name> <function> <input-types> <input-values>]
- [(`` (def: #export (<name> [(~~ (template.splice <input-values>))])
- (-> [(~~ (template.splice <input-types>))] (Value Transform))
- (|> (list (~~ (template.splice <input-values>)))
+ (template [<name> <function> <input_types> <input_values>]
+ [(`` (def: #export (<name> [(~~ (template.spliced <input_values>))])
+ (-> [(~~ (template.spliced <input_types>))] (Value Transform))
+ (|> (list (~~ (template.spliced <input_values>)))
(list\map %number)
(..apply <function>))))]
- [translate-2d "translate" [Frac Frac] [x y]]
- [translate-3d "translate3d" [Frac Frac Frac] [x y z]]
- [translate-x "translateX" [Frac] [value]]
- [translate-y "translateY" [Frac] [value]]
- [translate-z "translateZ" [Frac] [value]]
+ [translate_2d "translate" [Frac Frac] [x y]]
+ [translate_3d "translate3d" [Frac Frac Frac] [x y z]]
+ [translate_x "translateX" [Frac] [value]]
+ [translate_y "translateY" [Frac] [value]]
+ [translate_z "translateZ" [Frac] [value]]
- [scale-2d "scale" [Frac Frac] [x y]]
- [scale-3d "scale3d" [Frac Frac Frac] [x y z]]
- [scale-x "scaleX" [Frac] [value]]
- [scale-y "scaleY" [Frac] [value]]
- [scale-z "scaleZ" [Frac] [value]]
+ [scale_2d "scale" [Frac Frac] [x y]]
+ [scale_3d "scale3d" [Frac Frac Frac] [x y z]]
+ [scale_x "scaleX" [Frac] [value]]
+ [scale_y "scaleY" [Frac] [value]]
+ [scale_z "scaleZ" [Frac] [value]]
[perspective "perspective" [Frac] [value]]
)
- (template [<name> <function> <input-types> <input-values>]
- [(`` (def: #export (<name> [(~~ (template.splice <input-values>))])
- (-> [(~~ (template.splice <input-types>))] (Value Transform))
- (|> (list (~~ (template.splice <input-values>)))
+ (template [<name> <function> <input_types> <input_values>]
+ [(`` (def: #export (<name> [(~~ (template.spliced <input_values>))])
+ (-> [(~~ (template.spliced <input_types>))] (Value Transform))
+ (|> (list (~~ (template.spliced <input_values>)))
(list\map ..angle)
(..apply <function>))))]
- [rotate-2d "rotate" [Angle] [angle]]
- [rotate-x "rotateX" [Angle] [angle]]
- [rotate-y "rotateY" [Angle] [angle]]
- [rotate-z "rotateZ" [Angle] [angle]]
+ [rotate_2d "rotate" [Angle] [angle]]
+ [rotate_x "rotateX" [Angle] [angle]]
+ [rotate_y "rotateY" [Angle] [angle]]
+ [rotate_z "rotateZ" [Angle] [angle]]
- [skew "skew" [Angle Angle] [x-angle y-angle]]
- [skew-x "skewX" [Angle] [angle]]
- [skew-y "skewY" [Angle] [angle]]
+ [skew "skew" [Angle Angle] [x_angle y_angle]]
+ [skew_x "skewX" [Angle] [angle]]
+ [skew_y "skewY" [Angle] [angle]]
)
- (def: #export (rotate-3d [x y z angle])
+ (def: #export (rotate_3d [x y z angle])
(-> [Frac Frac Frac Angle] (Value Transform))
(..apply "rotate3d"
(list (%number x) (%number y) (%number z) (..angle angle))))
- (def: origin-separator " ")
+ (def: origin_separator " ")
- (def: #export (origin-2d x y)
- (-> (Value Length) (Value Length) (Value Transform-Origin))
- (:abstraction (format (:representation x) ..origin-separator
+ (def: #export (origin_2d x y)
+ (-> (Value Length) (Value Length) (Value Transform_Origin))
+ (:abstraction (format (:representation x) ..origin_separator
(:representation y))))
- (def: #export (origin-3d x y z)
- (-> (Value Length) (Value Length) (Value Length) (Value Transform-Origin))
- (:abstraction (format (:representation x) ..origin-separator
- (:representation y) ..origin-separator
+ (def: #export (origin_3d x y z)
+ (-> (Value Length) (Value Length) (Value Length) (Value Transform_Origin))
+ (:abstraction (format (:representation x) ..origin_separator
+ (:representation y) ..origin_separator
(:representation z))))
- (def: #export vertical-align
- (-> (Value Length) (Value Vertical-Align))
+ (def: #export vertical_align
+ (-> (Value Length) (Value Vertical_Align))
(|>> :transmutation))
- (def: #export (z-index index)
- (-> Int (Value Z-Index))
+ (def: #export (z_index index)
+ (-> Int (Value Z_Index))
(:abstraction (if (i.< +0 index)
(%.int index)
(%.nat (.nat index)))))
- (multi: multi-image Image ",")
- (multi: multi-shadow Shadow ",")
- (multi: multi-content Content " ")
+ (multi: multi_image Image ",")
+ (multi: multi_shadow Shadow ",")
+ (multi: multi_content Content " ")
)