git.iko.soy/typeable/elm-ui
on master help sign in
:art: elm-format-0.8.0
c623099Matthew Griffith
src/Element.elm−1
@@ -83,7 +83,6 @@ Here's what we can expect:
83
83
84**Note** `spacing` set on a `paragraph`, will set the pixel spacing between lines.
84**Note** `spacing` set on a `paragraph`, will set the pixel spacing between lines.
85
85
86−
87@docs padding, paddingXY, paddingEach
86@docs padding, paddingXY, paddingEach
88
87
89@docs spacing, spacingXY, spaceEvenly
88@docs spacing, spacingXY, spaceEvenly
src/Element/Background.elm+4−10
@@ -1,13 +1,7 @@
1−module Element.Background
1+module Element.Background exposing
2− exposing
3− ( color
4− , gradient
2+ ( color, gradient
5− , image
3+ , image, uncropped, tiled, tiledX, tiledY
6− , tiled
7− , tiledX
8− , tiledY
9− , uncropped
10− )
4+ )
11
5
12{-|
6{-|
13
7
src/Element/Border.elm+7−16
@@ -1,19 +1,10 @@
1−module Element.Border
1+module Element.Border exposing
2− exposing
3− ( color
2+ ( color
3+ , width, widthXY, widthEach
4− , dashed
4+ , solid, dashed, dotted
5− , dotted
5+ , rounded, roundEach
6− , glow
7− , innerGlow
6+ , glow, innerGlow, shadow, innerShadow
8− , innerShadow
9− , roundEach
10− , rounded
11− , shadow
12− , solid
13− , width
14− , widthEach
15− , widthXY
16− )
7+ )
17
8
18{-|
9{-|
19
10
src/Element/Events.elm+11−18
@@ -1,21 +1,13 @@
1−module Element.Events
1+module Element.Events exposing
2− exposing
2+ ( onClick, onDoubleClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, onMouseMove
3− ( onClick
3+ , onFocus, onLoseFocus
4− -- , onClickCoords
4+ -- , onClickCoords
5− -- , onClickPageCoords
5+ -- , onClickPageCoords
6− -- , onClickScreenCoords
6+ -- , onClickScreenCoords
7− , onDoubleClick
7+ -- , onMouseCoords
8− , onFocus
9− , onLoseFocus
10− -- , onMouseCoords
11− , onMouseDown
12− , onMouseEnter
13− , onMouseLeave
14− , onMouseMove
15− -- , onMousePageCoords
8+ -- , onMousePageCoords
16− -- , onMouseScreenCoords
9+ -- , onMouseScreenCoords
17− , onMouseUp
18− )
10+ )
19
11
20{-|
12{-|
21
13
@@ -38,6 +30,7 @@ import Json.Decode as Json
38import VirtualDom
30import VirtualDom
39
31
40
32
33+
41-- MOUSE EVENTS
34-- MOUSE EVENTS
42
35
43
36
src/Element/Input.elm+40−36
@@ -1,35 +1,14 @@
1−module Element.Input
1+module Element.Input exposing
2− exposing
3− ( Label
4− , Option
5− , OptionState(..)
6− , Placeholder
7− , Thumb
8− , button
2+ ( button
9− , checkbox
3+ , checkbox, defaultCheckbox
4+ , text, Placeholder, placeholder
10− , currentPassword
5+ , username, newPassword, currentPassword, email, search, spellChecked
11− , defaultCheckbox
6+ , multiline
12− , defaultThumb
7+ , slider, Thumb, thumb, defaultThumb
13− , email
8+ , radio, radioRow, Option, option, optionWith, OptionState(..)
14− , focusedOnLoad
9+ , Label, labelAbove, labelBelow, labelLeft, labelRight
15− , labelAbove
10+ , focusedOnLoad
16− , labelBelow
17− , labelLeft
18− , labelRight
19− , multiline
20− , newPassword
21− , option
22− , optionWith
23− , placeholder
24− , radio
25− , radioRow
26− , search
27− , slider
28− , spellChecked
29− , text
30− , thumb
31− , username
32− )
11+ )
33
12
34{-|
13{-|
35
14
@@ -42,9 +21,7 @@ module Element.Input
42
21
43@docs text, Placeholder, placeholder
22@docs text, Placeholder, placeholder
44
23
45−
46−We can also give a hint about what type of content our text field contains. This will allow things like autofill to work correctly.
24+We can also give a hint about what type of content our text field contains. This will allow things like autofill to work correctly.
47−
48
25
49@docs username, newPassword, currentPassword, email, search, spellChecked
26@docs username, newPassword, currentPassword, email, search, spellChecked
50
27
@@ -197,6 +174,7 @@ button attrs { onPress, label } =
197focusDefault attrs =
174focusDefault attrs =
198 if List.any hasFocusStyle attrs then
175 if List.any hasFocusStyle attrs then
199 Internal.NoAttribute
176 Internal.NoAttribute
177+
200 else
178 else
201 Internal.htmlClass "focusable"
179 Internal.htmlClass "focusable"
202
180
@@ -239,8 +217,10 @@ checkbox attrs { label, icon, checked, onChange } =
239 \code ->
217 \code ->
240 if code == enter then
218 if code == enter then
241 Just <| onChange (not checked)
219 Just <| onChange (not checked)
220+
242 else if code == space then
221 else if code == space then
243 Just <| onChange (not checked)
222 Just <| onChange (not checked)
223+
244 else
224 else
245 Nothing
225 Nothing
246 ]
226 ]
@@ -257,6 +237,7 @@ checkbox attrs { label, icon, checked, onChange } =
257 Html.Attributes.attribute "aria-checked" <|
237 Html.Attributes.attribute "aria-checked" <|
258 if checked then
238 if checked then
259 "true"
239 "true"
240+
260 else
241 else
261 "false"
242 "false"
262 , Element.centerY
243 , Element.centerY
@@ -298,6 +279,7 @@ defaultThumb =
298
279
299 Input.slider
280 Input.slider
300 [ Element.height (Element.px 30)
281 [ Element.height (Element.px 30)
282+
301 -- Here is where we're creating/styling the "track"
283 -- Here is where we're creating/styling the "track"
302 , Element.behindContent
284 , Element.behindContent
303 (Element.el
285 (Element.el
@@ -509,16 +491,19 @@ slider attributes input =
509 , if vertical then
491 , if vertical then
510 Internal.Attr <|
492 Internal.Attr <|
511 Html.Attributes.attribute "orient" "vertical"
493 Html.Attributes.attribute "orient" "vertical"
494+
512 else
495 else
513 Internal.NoAttribute
496 Internal.NoAttribute
514 , Element.width <|
497 , Element.width <|
515 if vertical then
498 if vertical then
516 Maybe.withDefault (Element.px 20) trackHeight
499 Maybe.withDefault (Element.px 20) trackHeight
500+
517 else
501 else
518 Maybe.withDefault Element.fill trackWidth
502 Maybe.withDefault Element.fill trackWidth
519 , Element.height <|
503 , Element.height <|
520 if vertical then
504 if vertical then
521 Maybe.withDefault Element.fill trackWidth
505 Maybe.withDefault Element.fill trackWidth
506+
522 else
507 else
523 Maybe.withDefault (Element.px 20) trackHeight
508 Maybe.withDefault (Element.px 20) trackHeight
524 ]
509 ]
@@ -533,6 +518,7 @@ slider attributes input =
533 ++ [ Element.behindContent <|
518 ++ [ Element.behindContent <|
534 if vertical then
519 if vertical then
535 viewVerticalThumb factor thumbAttributes trackWidth
520 viewVerticalThumb factor thumbAttributes trackWidth
521+
536 else
522 else
537 viewHorizontalThumb factor thumbAttributes trackHeight
523 viewHorizontalThumb factor thumbAttributes trackHeight
538 ]
524 ]
@@ -765,6 +751,7 @@ textHelper textInput attrs textOptions =
765 |> (\x ->
751 |> (\x ->
766 if x < 1 then
752 if x < 1 then
767 1
753 1
754+
768 else
755 else
769 x
756 x
770 )
757 )
@@ -863,6 +850,7 @@ textHelper textInput attrs textOptions =
863 , Element.alpha
850 , Element.alpha
864 (if textOptions.text == "" then
851 (if textOptions.text == "" then
865 1
852 1
853+
866 else
854 else
867 0
855 0
868 )
856 )
@@ -918,7 +906,6 @@ text =
918
906
919
907
920{-| If spell checking is available, this input will be spellchecked.
908{-| If spell checking is available, this input will be spellchecked.
921−
922-}
909-}
923spellChecked :
910spellChecked :
924 List (Attribute msg)
911 List (Attribute msg)
@@ -978,6 +965,7 @@ newPassword attrs pass =
978 TextInputNode <|
965 TextInputNode <|
979 if pass.show then
966 if pass.show then
980 "text"
967 "text"
968+
981 else
969 else
982 "password"
970 "password"
983 , spellchecked = False
971 , spellchecked = False
@@ -1008,6 +996,7 @@ currentPassword attrs pass =
1008 TextInputNode <|
996 TextInputNode <|
1009 if pass.show then
997 if pass.show then
1010 "text"
998 "text"
999+
1011 else
1000 else
1012 "password"
1001 "password"
1013 , spellchecked = False
1002 , spellchecked = False
@@ -1181,6 +1170,7 @@ optionWith val view =
1181 [ el None [] <|
1170 [ el None [] <|
1182 if selected then
1171 if selected then
1183 text ":D"
1172 text ":D"
1173+
1184 else
1174 else
1185 text ":("
1175 text ":("
1186 , text "burrito"
1176 , text "burrito"
@@ -1301,6 +1291,7 @@ radioHelper orientation attrs input =
1301 status =
1291 status =
1302 if Just val == input.selected then
1292 if Just val == input.selected then
1303 Selected
1293 Selected
1294+
1304 else
1295 else
1305 Idle
1296 Idle
1306 in
1297 in
@@ -1364,6 +1355,7 @@ radioHelper orientation attrs input =
1364 NotFound ->
1355 NotFound ->
1365 if Just val == input.selected then
1356 if Just val == input.selected then
1366 ( BeforeFound, prev, nxt )
1357 ( BeforeFound, prev, nxt )
1358+
1367 else
1359 else
1368 ( found, val, nxt )
1360 ( found, val, nxt )
1369
1361
@@ -1452,6 +1444,7 @@ radioHelper orientation attrs input =
1452 attrs
1444 attrs
1453 in
1445 in
1454 Internal.StyleClass Flag.transparency (Internal.Transparency "transparent" 1.0) :: pseudos
1446 Internal.StyleClass Flag.transparency (Internal.Transparency "transparent" 1.0) :: pseudos
1447+
1455 else
1448 else
1456 []
1449 []
1457
1450
@@ -1492,12 +1485,16 @@ radioHelper orientation attrs input =
1492 \code ->
1485 \code ->
1493 if code == leftArrow then
1486 if code == leftArrow then
1494 Just (input.onChange prev)
1487 Just (input.onChange prev)
1488+
1495 else if code == upArrow then
1489 else if code == upArrow then
1496 Just (input.onChange prev)
1490 Just (input.onChange prev)
1491+
1497 else if code == rightArrow then
1492 else if code == rightArrow then
1498 Just (input.onChange next)
1493 Just (input.onChange next)
1494+
1499 else if code == downArrow then
1495 else if code == downArrow then
1500 Just (input.onChange next)
1496 Just (input.onChange next)
1497+
1501 else if code == space then
1498 else if code == space then
1502 case input.selected of
1499 case input.selected of
1503 Nothing ->
1500 Nothing ->
@@ -1505,6 +1502,7 @@ radioHelper orientation attrs input =
1505
1502
1506 _ ->
1503 _ ->
1507 Nothing
1504 Nothing
1505+
1508 else
1506 else
1509 Nothing
1507 Nothing
1510 )
1508 )
@@ -1642,6 +1640,7 @@ onKey desiredCode msg =
1642 decode code =
1640 decode code =
1643 if code == desiredCode then
1641 if code == desiredCode then
1644 Json.succeed msg
1642 Json.succeed msg
1643+
1645 else
1644 else
1646 Json.fail "Not the enter key"
1645 Json.fail "Not the enter key"
1647
1646
@@ -1797,6 +1796,7 @@ defaultCheckbox checked =
1797 , Border.color <|
1796 , Border.color <|
1798 if checked then
1797 if checked then
1799 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1798 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1799+
1800 else
1800 else
1801 Element.rgb (211 / 255) (211 / 255) (211 / 255)
1801 Element.rgb (211 / 255) (211 / 255) (211 / 255)
1802 , Border.shadow <|
1802 , Border.shadow <|
@@ -1806,17 +1806,20 @@ defaultCheckbox checked =
1806 , color =
1806 , color =
1807 if checked then
1807 if checked then
1808 Element.rgba (238 / 255) (238 / 255) (238 / 255) 0
1808 Element.rgba (238 / 255) (238 / 255) (238 / 255) 0
1809+
1809 else
1810 else
1810 Element.rgb (238 / 255) (238 / 255) (238 / 255)
1811 Element.rgb (238 / 255) (238 / 255) (238 / 255)
1811 }
1812 }
1812 , Background.color <|
1813 , Background.color <|
1813 if checked then
1814 if checked then
1814 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1815 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1816+
1815 else
1817 else
1816 white
1818 white
1817 , Border.width <|
1819 , Border.width <|
1818 if checked then
1820 if checked then
1819 0
1821 0
1822+
1820 else
1823 else
1821 1
1824 1
1822 ]
1825 ]
@@ -1837,6 +1840,7 @@ defaultCheckbox checked =
1837 }
1840 }
1838 ]
1841 ]
1839 Element.none
1842 Element.none
1843+
1840 else
1844 else
1841 Element.none
1845 Element.none
1842 )
1846 )
src/Element/Keyed.elm+1−1
@@ -1,4 +1,4 @@
1−module Element.Keyed exposing (column, el, row)
1+module Element.Keyed exposing (el, column, row)
2
2
3{-| Notes from the `Html.Keyed` on how keyed works:
3{-| Notes from the `Html.Keyed` on how keyed works:
4
4
src/Internal/Flag.elm+2−1
@@ -1,4 +1,4 @@
1−module Internal.Flag exposing (..)
1+module Internal.Flag exposing (Field(..), Flag(..), active, add, alignBottom, alignRight, behind, bgColor, bgGradient, bgImage, borderColor, borderRound, borderStyle, borderWidth, centerX, centerY, cursor, flag, focus, fontAlignment, fontColor, fontFamily, fontSize, fontWeight, gridPosition, gridTemplate, height, heightBetween, heightContent, heightFill, hover, letterSpacing, merge, moveX, moveY, none, overflow, padding, present, rotate, scale, shadows, spacing, transparency, txtShadows, value, width, widthBetween, widthContent, widthFill, wordSpacing, xAlign, yAlign)
2
2
3{-| -}
3{-| -}
4
4
@@ -67,6 +67,7 @@ flag i =
67 if i > 31 then
67 if i > 31 then
68 Second
68 Second
69 (Bitwise.shiftLeftBy (i - 32) 1)
69 (Bitwise.shiftLeftBy (i - 32) 1)
70+
70 else
71 else
71 Flag
72 Flag
72 (Bitwise.shiftLeftBy i 1)
73 (Bitwise.shiftLeftBy i 1)
src/Internal/Grid.elm+7−1
@@ -1,4 +1,4 @@
1−module Internal.Grid exposing (..)
1+module Internal.Grid exposing (Around, Layout(..), PositionedElement, RelativePosition(..), build, createGrid, getWidth, relative)
2
2
3{-| Relative positioning within a grid.
3{-| Relative positioning within a grid.
4
4
@@ -80,10 +80,12 @@ createGrid ( spacingX, spacingY ) nearby =
80 [ 1
80 [ 1
81 , if Nothing == nearby.above then
81 , if Nothing == nearby.above then
82 0
82 0
83+
83 else
84 else
84 1
85 1
85 , if Nothing == nearby.below then
86 , if Nothing == nearby.below then
86 0
87 0
88+
87 else
89 else
88 1
90 1
89 ]
91 ]
@@ -93,10 +95,12 @@ createGrid ( spacingX, spacingY ) nearby =
93 [ 1
95 [ 1
94 , if Nothing == nearby.left then
96 , if Nothing == nearby.left then
95 0
97 0
98+
96 else
99 else
97 1
100 1
98 , if Nothing == nearby.right then
101 , if Nothing == nearby.right then
99 0
102 0
103+
100 else
104 else
101 1
105 1
102 ]
106 ]
@@ -107,6 +111,7 @@ createGrid ( spacingX, spacingY ) nearby =
107 , primary = 1
111 , primary = 1
108 , below = 2
112 , below = 2
109 }
113 }
114+
110 else
115 else
111 { above = 1
116 { above = 1
112 , primary = 2
117 , primary = 2
@@ -119,6 +124,7 @@ createGrid ( spacingX, spacingY ) nearby =
119 , primary = 1
124 , primary = 1
120 , right = 2
125 , right = 2
121 }
126 }
127+
122 else
128 else
123 { left = 1
129 { left = 1
124 , primary = 2
130 , primary = 2
src/Internal/Model.elm+55−1
@@ -1,4 +1,4 @@
1−module Internal.Model exposing (..)
1+module Internal.Model exposing (Aligned(..), Angle, Attribute(..), Axis(..), Children(..), Color(..), Description(..), Element(..), EmbedStyle(..), FocusStyle, Font(..), Gathered, HAlign(..), HoverSetting(..), LayoutContext(..), Length(..), Location(..), NodeName(..), Option(..), OptionRecord, Padding(..), Property(..), PseudoClass(..), RenderMode(..), Shadow, Spacing(..), Style(..), TransformComponent(..), Transformation(..), VAlign(..), XYZ, addNodeName, addWhen, alignXName, alignYName, asColumn, asEl, asGrid, asParagraph, asRow, asTextColumn, boxShadowName, columnClass, composeTransformation, contextClasses, createElement, defaultOptions, div, element, embedKeyed, embedWith, extractSpacingAndPadding, filter, finalizeNode, floatClass, focusDefaultStyle, formatBoxShadow, formatColor, formatColorClass, formatDropShadow, formatTextShadow, gatherAttrRecursive, get, getHeight, getSpacing, getStyleName, getWidth, gridClass, htmlClass, lengthClassName, map, mapAttr, mapAttrFromStyle, noStyleSheet, onlyStyles, optionsToRecord, paddingName, pageClass, paragraphClass, reduceRecursive, reduceRecursiveCalcName, reduceStyles, reduceStylesRecursive, removeNever, renderFocusStyle, renderFont, renderFontClassName, renderHeight, renderRoot, renderWidth, rootStyle, rowClass, singleClass, skippable, sortedReduce, spacingName, staticRoot, tag, textElement, textElementFill, textShadowName, toHtml, toStyleSheet, toStyleSheetString, transformClass, transformValue, unit, unstyled, untransformed, unwrapDecorations, unwrapDecsHelper)
2
2
3{-| -}
3{-| -}
4
4
@@ -275,6 +275,7 @@ finalizeNode has node attributes children embedMode parentContext =
275 AsRow ->
275 AsRow ->
276 if Flag.present Flag.widthFill has && not (Flag.present Flag.widthBetween has) then
276 if Flag.present Flag.widthFill has && not (Flag.present Flag.widthBetween has) then
277 html
277 html
278+
278 else if Flag.present Flag.alignRight has then
279 else if Flag.present Flag.alignRight has then
279 Html.u
280 Html.u
280 [ Html.Attributes.class
281 [ Html.Attributes.class
@@ -288,6 +289,7 @@ finalizeNode has node attributes children embedMode parentContext =
288 )
289 )
289 ]
290 ]
290 [ html ]
291 [ html ]
292+
291 else if Flag.present Flag.centerX has then
293 else if Flag.present Flag.centerX has then
292 Html.s
294 Html.s
293 [ Html.Attributes.class
295 [ Html.Attributes.class
@@ -301,12 +303,14 @@ finalizeNode has node attributes children embedMode parentContext =
301 )
303 )
302 ]
304 ]
303 [ html ]
305 [ html ]
306+
304 else
307 else
305 html
308 html
306
309
307 AsColumn ->
310 AsColumn ->
308 if Flag.present Flag.heightFill has && not (Flag.present Flag.heightBetween has) then
311 if Flag.present Flag.heightFill has && not (Flag.present Flag.heightBetween has) then
309 html
312 html
313+
310 else if Flag.present Flag.centerY has then
314 else if Flag.present Flag.centerY has then
311 Html.s
315 Html.s
312 [ Html.Attributes.class
316 [ Html.Attributes.class
@@ -319,6 +323,7 @@ finalizeNode has node attributes children embedMode parentContext =
319 )
323 )
320 ]
324 ]
321 [ html ]
325 [ html ]
326+
322 else if Flag.present Flag.alignBottom has then
327 else if Flag.present Flag.alignBottom has then
323 Html.u
328 Html.u
324 [ Html.Attributes.class
329 [ Html.Attributes.class
@@ -331,6 +336,7 @@ finalizeNode has node attributes children embedMode parentContext =
331 )
336 )
332 ]
337 ]
333 [ html ]
338 [ html ]
339+
334 else
340 else
335 html
341 html
336
342
@@ -349,6 +355,7 @@ embedWith static opts styles children =
349 |> toStyleSheet opts
355 |> toStyleSheet opts
350 )
356 )
351 :: children
357 :: children
358+
352 else
359 else
353 (styles
360 (styles
354 |> List.foldl reduceStyles ( Set.empty, [ renderFocusStyle opts.focus ] )
361 |> List.foldl reduceStyles ( Set.empty, [ renderFocusStyle opts.focus ] )
@@ -372,6 +379,7 @@ embedKeyed static opts styles children =
372 |> toStyleSheet opts
379 |> toStyleSheet opts
373 )
380 )
374 :: children
381 :: children
382+
375 else
383 else
376 ( "dynamic-stylesheet"
384 ( "dynamic-stylesheet"
377 , styles
385 , styles
@@ -397,6 +405,7 @@ reduceStylesRecursive cache found styles =
397 in
405 in
398 if Set.member styleName cache then
406 if Set.member styleName cache then
399 reduceStylesRecursive cache found remaining
407 reduceStylesRecursive cache found remaining
408+
400 else
409 else
401 reduceStylesRecursive (Set.insert styleName cache) (head :: found) remaining
410 reduceStylesRecursive (Set.insert styleName cache) (head :: found) remaining
402
411
@@ -409,6 +418,7 @@ reduceStyles style (( cache, existing ) as nevermind) =
409 in
418 in
410 if Set.member styleName cache then
419 if Set.member styleName cache then
411 nevermind
420 nevermind
421+
412 else
422 else
413 ( Set.insert styleName cache
423 ( Set.insert styleName cache
414 , style :: existing
424 , style :: existing
@@ -434,6 +444,7 @@ reduceRecursiveCalcName found styles =
434 headOfList :: other :: remaining ->
444 headOfList :: other :: remaining ->
435 if headOfList /= other then
445 if headOfList /= other then
436 reduceRecursiveCalcName (headOfList :: found) (other :: remaining)
446 reduceRecursiveCalcName (headOfList :: found) (other :: remaining)
447+
437 else
448 else
438 reduceRecursiveCalcName found (other :: remaining)
449 reduceRecursiveCalcName found (other :: remaining)
439
450
@@ -450,6 +461,7 @@ reduceRecursive found styles =
450 ( headOfListName, headOfList ) :: ( otherName, other ) :: remaining ->
461 ( headOfListName, headOfList ) :: ( otherName, other ) :: remaining ->
451 if headOfListName /= otherName then
462 if headOfListName /= otherName then
452 reduceRecursive (headOfList :: found) (( otherName, other ) :: remaining)
463 reduceRecursive (headOfList :: found) (( otherName, other ) :: remaining)
464+
453 else
465 else
454 reduceRecursive found (( otherName, other ) :: remaining)
466 reduceRecursive found (( otherName, other ) :: remaining)
455
467
@@ -674,6 +686,7 @@ skippable flag style =
674
686
675 _ ->
687 _ ->
676 False
688 False
689+
677 else
690 else
678 case style of
691 case style of
679 FontSize i ->
692 FontSize i ->
@@ -719,6 +732,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
719 Class flag exactClassName ->
732 Class flag exactClassName ->
720 if Flag.present flag has then
733 if Flag.present flag has then
721 gatherAttrRecursive classes node has transform styles attrs children remaining
734 gatherAttrRecursive classes node has transform styles attrs children remaining
735+
722 else
736 else
723 gatherAttrRecursive (exactClassName ++ " " ++ classes) node (Flag.add flag has) transform styles attrs children remaining
737 gatherAttrRecursive (exactClassName ++ " " ++ classes) node (Flag.add flag has) transform styles attrs children remaining
724
738
@@ -728,6 +742,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
728 StyleClass flag style ->
742 StyleClass flag style ->
729 if Flag.present flag has then
743 if Flag.present flag has then
730 gatherAttrRecursive classes node has transform styles attrs children remaining
744 gatherAttrRecursive classes node has transform styles attrs children remaining
745+
731 else if skippable flag style then
746 else if skippable flag style then
732 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
747 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
733 node
748 node
@@ -737,6 +752,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
737 attrs
752 attrs
738 children
753 children
739 remaining
754 remaining
755+
740 else
756 else
741 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
757 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
742 node
758 node
@@ -760,6 +776,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
760 Width width ->
776 Width width ->
761 if Flag.present Flag.width has then
777 if Flag.present Flag.width has then
762 gatherAttrRecursive classes node has transform styles attrs children remaining
778 gatherAttrRecursive classes node has transform styles attrs children remaining
779+
763 else
780 else
764 case width of
781 case width of
765 Px px ->
782 Px px ->
@@ -792,6 +809,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
792 attrs
809 attrs
793 children
810 children
794 remaining
811 remaining
812+
795 else
813 else
796 gatherAttrRecursive (classes ++ " " ++ Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion)
814 gatherAttrRecursive (classes ++ " " ++ Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion)
797 node
815 node
@@ -829,6 +847,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
829 Height height ->
847 Height height ->
830 if Flag.present Flag.height has then
848 if Flag.present Flag.height has then
831 gatherAttrRecursive classes node has transform styles attrs children remaining
849 gatherAttrRecursive classes node has transform styles attrs children remaining
850+
832 else
851 else
833 case height of
852 case height of
834 Px px ->
853 Px px ->
@@ -868,6 +887,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
868 attrs
887 attrs
869 children
888 children
870 remaining
889 remaining
890+
871 else
891 else
872 gatherAttrRecursive (classes ++ " " ++ (Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion))
892 gatherAttrRecursive (classes ++ " " ++ (Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion))
873 node
893 node
@@ -919,8 +939,10 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
919 Heading i ->
939 Heading i ->
920 if i <= 1 then
940 if i <= 1 then
921 gatherAttrRecursive classes (addNodeName "h1" node) has transform styles attrs children remaining
941 gatherAttrRecursive classes (addNodeName "h1" node) has transform styles attrs children remaining
942+
922 else if i < 7 then
943 else if i < 7 then
923 gatherAttrRecursive classes (addNodeName ("h" ++ String.fromInt i) node) has transform styles attrs children remaining
944 gatherAttrRecursive classes (addNodeName ("h" ++ String.fromInt i) node) has transform styles attrs children remaining
945+
924 else
946 else
925 gatherAttrRecursive classes (addNodeName "h6" node) has transform styles attrs children remaining
947 gatherAttrRecursive classes (addNodeName "h6" node) has transform styles attrs children remaining
926
948
@@ -1037,6 +1059,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
1037 newClasses =
1059 newClasses =
1038 if location == Behind then
1060 if location == Behind then
1039 Internal.Style.classes.hasBehind ++ " " ++ classes
1061 Internal.Style.classes.hasBehind ++ " " ++ classes
1062+
1040 else
1063 else
1041 classes
1064 classes
1042 in
1065 in
@@ -1045,6 +1068,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
1045 AlignX x ->
1068 AlignX x ->
1046 if Flag.present Flag.xAlign has then
1069 if Flag.present Flag.xAlign has then
1047 gatherAttrRecursive classes node has transform styles attrs children remaining
1070 gatherAttrRecursive classes node has transform styles attrs children remaining
1071+
1048 else
1072 else
1049 gatherAttrRecursive (alignXName x ++ " " ++ classes)
1073 gatherAttrRecursive (alignXName x ++ " " ++ classes)
1050 node
1074 node
@@ -1071,6 +1095,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
1071 AlignY y ->
1095 AlignY y ->
1072 if Flag.present Flag.yAlign has then
1096 if Flag.present Flag.yAlign has then
1073 gatherAttrRecursive classes node has transform styles attrs children remaining
1097 gatherAttrRecursive classes node has transform styles attrs children remaining
1098+
1074 else
1099 else
1075 gatherAttrRecursive (alignYName y ++ " " ++ classes)
1100 gatherAttrRecursive (alignYName y ++ " " ++ classes)
1076 node
1101 node
@@ -1114,6 +1139,7 @@ renderWidth w =
1114 , Internal.Style.classes.widthFill
1139 , Internal.Style.classes.widthFill
1115 , []
1140 , []
1116 )
1141 )
1142+
1117 else
1143 else
1118 ( Flag.add Flag.widthFill Flag.none
1144 ( Flag.add Flag.widthFill Flag.none
1119 , Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion
1145 , Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion
@@ -1195,6 +1221,7 @@ renderHeight h =
1195 , Internal.Style.classes.heightFill
1221 , Internal.Style.classes.heightFill
1196 , []
1222 , []
1197 )
1223 )
1224+
1198 else
1225 else
1199 ( Flag.add Flag.heightFill Flag.none
1226 ( Flag.add Flag.heightFill Flag.none
1200 , Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion
1227 , Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion
@@ -1323,6 +1350,7 @@ createElement context children rendered =
1323 ( html context :: htmls
1350 ( html context :: htmls
1324 , existingStyles
1351 , existingStyles
1325 )
1352 )
1353+
1326 else
1354 else
1327 ( html context :: htmls
1355 ( html context :: htmls
1328 , existingStyles
1356 , existingStyles
@@ -1333,13 +1361,16 @@ createElement context children rendered =
1333 ( styled.html NoStyleSheet context :: htmls
1361 ( styled.html NoStyleSheet context :: htmls
1334 , if List.isEmpty existingStyles then
1362 , if List.isEmpty existingStyles then
1335 styled.styles
1363 styled.styles
1364+
1336 else
1365 else
1337 styled.styles ++ existingStyles
1366 styled.styles ++ existingStyles
1338 )
1367 )
1368+
1339 else
1369 else
1340 ( styled.html NoStyleSheet context :: htmls
1370 ( styled.html NoStyleSheet context :: htmls
1341 , if List.isEmpty existingStyles then
1371 , if List.isEmpty existingStyles then
1342 styled.styles
1372 styled.styles
1373+
1343 else
1374 else
1344 styled.styles ++ existingStyles
1375 styled.styles ++ existingStyles
1345 )
1376 )
@@ -1361,16 +1392,19 @@ createElement context children rendered =
1361 ( VirtualDom.text
1392 ( VirtualDom.text
1362 (if context == asParagraph then
1393 (if context == asParagraph then
1363 str ++ " "
1394 str ++ " "
1395+
1364 else
1396 else
1365 str
1397 str
1366 )
1398 )
1367 :: htmls
1399 :: htmls
1368 , existingStyles
1400 , existingStyles
1369 )
1401 )
1402+
1370 else
1403 else
1371 ( textElement
1404 ( textElement
1372 (if context == asParagraph then
1405 (if context == asParagraph then
1373 str ++ " "
1406 str ++ " "
1407+
1374 else
1408 else
1375 str
1409 str
1376 )
1410 )
@@ -1388,6 +1422,7 @@ createElement context children rendered =
1388 ( ( key, html context ) :: htmls
1422 ( ( key, html context ) :: htmls
1389 , existingStyles
1423 , existingStyles
1390 )
1424 )
1425+
1391 else
1426 else
1392 ( ( key, html context ) :: htmls
1427 ( ( key, html context ) :: htmls
1393 , existingStyles
1428 , existingStyles
@@ -1399,13 +1434,16 @@ createElement context children rendered =
1399 :: htmls
1434 :: htmls
1400 , if List.isEmpty existingStyles then
1435 , if List.isEmpty existingStyles then
1401 styled.styles
1436 styled.styles
1437+
1402 else
1438 else
1403 styled.styles ++ existingStyles
1439 styled.styles ++ existingStyles
1404 )
1440 )
1441+
1405 else
1442 else
1406 ( ( key, styled.html NoStyleSheet context ) :: htmls
1443 ( ( key, styled.html NoStyleSheet context ) :: htmls
1407 , if List.isEmpty existingStyles then
1444 , if List.isEmpty existingStyles then
1408 styled.styles
1445 styled.styles
1446+
1409 else
1447 else
1410 styled.styles ++ existingStyles
1448 styled.styles ++ existingStyles
1411 )
1449 )
@@ -1424,6 +1462,7 @@ createElement context children rendered =
1424 , VirtualDom.text
1462 , VirtualDom.text
1425 (if context == asParagraph then
1463 (if context == asParagraph then
1426 str ++ " "
1464 str ++ " "
1465+
1427 else
1466 else
1428 str
1467 str
1429 )
1468 )
@@ -1431,11 +1470,13 @@ createElement context children rendered =
1431 :: htmls
1470 :: htmls
1432 , existingStyles
1471 , existingStyles
1433 )
1472 )
1473+
1434 else
1474 else
1435 ( ( key
1475 ( ( key
1436 , textElement
1476 , textElement
1437 (if context == asParagraph then
1477 (if context == asParagraph then
1438 str ++ " "
1478 str ++ " "
1479+
1439 else
1480 else
1440 str
1481 str
1441 )
1482 )
@@ -1455,6 +1496,7 @@ createElement context children rendered =
1455 newStyles =
1496 newStyles =
1456 if List.isEmpty styles then
1497 if List.isEmpty styles then
1457 rendered.styles
1498 rendered.styles
1499+
1458 else
1500 else
1459 rendered.styles ++ styles
1501 rendered.styles ++ styles
1460 in
1502 in
@@ -1482,6 +1524,7 @@ createElement context children rendered =
1482 newStyles =
1524 newStyles =
1483 if List.isEmpty styles then
1525 if List.isEmpty styles then
1484 rendered.styles
1526 rendered.styles
1527+
1485 else
1528 else
1486 rendered.styles ++ styles
1529 rendered.styles ++ styles
1487 in
1530 in
@@ -1520,6 +1563,7 @@ staticRoot =
1520addWhen ifThis x to =
1563addWhen ifThis x to =
1521 if ifThis then
1564 if ifThis then
1522 x :: to
1565 x :: to
1566+
1523 else
1567 else
1524 to
1568 to
1525
1569
@@ -1550,18 +1594,21 @@ filter attrs =
1550 Width width ->
1594 Width width ->
1551 if Set.member "width" has then
1595 if Set.member "width" has then
1552 ( found, has )
1596 ( found, has )
1597+
1553 else
1598 else
1554 ( x :: found, Set.insert "width" has )
1599 ( x :: found, Set.insert "width" has )
1555
1600
1556 Height height ->
1601 Height height ->
1557 if Set.member "height" has then
1602 if Set.member "height" has then
1558 ( found, has )
1603 ( found, has )
1604+
1559 else
1605 else
1560 ( x :: found, Set.insert "height" has )
1606 ( x :: found, Set.insert "height" has )
1561
1607
1562 Describe description ->
1608 Describe description ->
1563 if Set.member "described" has then
1609 if Set.member "described" has then
1564 ( found, has )
1610 ( found, has )
1611+
1565 else
1612 else
1566 ( x :: found, Set.insert "described" has )
1613 ( x :: found, Set.insert "described" has )
1567
1614
@@ -1571,18 +1618,21 @@ filter attrs =
1571 AlignX _ ->
1618 AlignX _ ->
1572 if Set.member "align-x" has then
1619 if Set.member "align-x" has then
1573 ( found, has )
1620 ( found, has )
1621+
1574 else
1622 else
1575 ( x :: found, Set.insert "align-x" has )
1623 ( x :: found, Set.insert "align-x" has )
1576
1624
1577 AlignY _ ->
1625 AlignY _ ->
1578 if Set.member "align-y" has then
1626 if Set.member "align-y" has then
1579 ( found, has )
1627 ( found, has )
1628+
1580 else
1629 else
1581 ( x :: found, Set.insert "align-y" has )
1630 ( x :: found, Set.insert "align-y" has )
1582
1631
1583 TransformComponent _ _ ->
1632 TransformComponent _ _ ->
1584 if Set.member "transform" has then
1633 if Set.member "transform" has then
1585 ( found, has )
1634 ( found, has )
1635+
1586 else
1636 else
1587 ( x :: found, Set.insert "transform" has )
1637 ( x :: found, Set.insert "transform" has )
1588 )
1638 )
@@ -1598,6 +1648,7 @@ get attrs isAttr =
1598 (\x found ->
1648 (\x found ->
1599 if isAttr x then
1649 if isAttr x then
1600 x :: found
1650 x :: found
1651+
1601 else
1652 else
1602 found
1653 found
1603 )
1654 )
@@ -2030,6 +2081,7 @@ toStyleSheetString options stylesheet =
2030 renderProps force (Property key val) existing =
2081 renderProps force (Property key val) existing =
2031 if force then
2082 if force then
2032 existing ++ "\n " ++ key ++ ": " ++ val ++ " !important;"
2083 existing ++ "\n " ++ key ++ ": " ++ val ++ " !important;"
2084+
2033 else
2085 else
2034 existing ++ "\n " ++ key ++ ": " ++ val ++ ";"
2086 existing ++ "\n " ++ key ++ ": " ++ val ++ ";"
2035
2087
@@ -2519,6 +2571,7 @@ formatBoxShadow shadow =
2519 List.filterMap identity
2571 List.filterMap identity
2520 [ if shadow.inset then
2572 [ if shadow.inset then
2521 Just "inset"
2573 Just "inset"
2574+
2522 else
2575 else
2523 Nothing
2576 Nothing
2524 , Just <| String.fromFloat (Tuple.first shadow.offset) ++ "px"
2577 , Just <| String.fromFloat (Tuple.first shadow.offset) ++ "px"
@@ -2533,6 +2586,7 @@ boxShadowName shadow =
2533 String.concat <|
2586 String.concat <|
2534 [ if shadow.inset then
2587 [ if shadow.inset then
2535 "box-inset"
2588 "box-inset"
2589+
2536 else
2590 else
2537 "box-"
2591 "box-"
2538 , String.fromFloat (Tuple.first shadow.offset) ++ "px"
2592 , String.fromFloat (Tuple.first shadow.offset) ++ "px"