git.iko.soy/typeable/elm-ui
on master help sign in
:art: elm-format-0.8.0
commitc623099fe3ea43a6bfabdf3a5f8d8f5fa200d0f8 authorMatthew Griffith <mdg.griffith@gmail.com> dateFri 31 Aug 2018, 07:55 (8 years ago) parent32c9300
9 files changed+127−85
src/Element.elm−1 src/Element/Background.elm+4−10 src/Element/Border.elm+7−16 src/Element/Events.elm+11−18 src/Element/Input.elm+40−36 src/Element/Keyed.elm+1−1 src/Internal/Flag.elm+2−1 src/Internal/Grid.elm+7−1 src/Internal/Model.elm+55−1
src/Element.elm−1
@@ -83,7 +83,6 @@ Here's what we can expect:
8383
8484**Note** `spacing` set on a `paragraph`, will set the pixel spacing between lines.
8585
86−
8786@docs padding, paddingXY, paddingEach
8887
8988@docs spacing, spacingXY, spaceEvenly
src/Element/Background.elm+4−10
@@ -1,13 +1,7 @@
1−module Element.Background
2− exposing
3− ( color
4− , gradient
5− , image
6− , tiled
7− , tiledX
8− , tiledY
9− , uncropped
10− )
1+module Element.Background exposing
2+ ( color, gradient
3+ , image, uncropped, tiled, tiledX, tiledY
4+ )
115
126{-|
137
src/Element/Border.elm+7−16
@@ -1,19 +1,10 @@
1−module Element.Border
2− exposing
3− ( color
4− , dashed
5− , dotted
6− , glow
7− , innerGlow
8− , innerShadow
9− , roundEach
10− , rounded
11− , shadow
12− , solid
13− , width
14− , widthEach
15− , widthXY
16− )
1+module Element.Border exposing
2+ ( color
3+ , width, widthXY, widthEach
4+ , solid, dashed, dotted
5+ , rounded, roundEach
6+ , glow, innerGlow, shadow, innerShadow
7+ )
178
189{-|
1910
src/Element/Events.elm+11−18
@@ -1,21 +1,13 @@
1−module Element.Events
2− exposing
3− ( onClick
4− -- , onClickCoords
5− -- , onClickPageCoords
6− -- , onClickScreenCoords
7− , onDoubleClick
8− , onFocus
9− , onLoseFocus
10− -- , onMouseCoords
11− , onMouseDown
12− , onMouseEnter
13− , onMouseLeave
14− , onMouseMove
15− -- , onMousePageCoords
16− -- , onMouseScreenCoords
17− , onMouseUp
18− )
1+module Element.Events exposing
2+ ( onClick, onDoubleClick, onMouseDown, onMouseUp, onMouseEnter, onMouseLeave, onMouseMove
3+ , onFocus, onLoseFocus
4+ -- , onClickCoords
5+ -- , onClickPageCoords
6+ -- , onClickScreenCoords
7+ -- , onMouseCoords
8+ -- , onMousePageCoords
9+ -- , onMouseScreenCoords
10+ )
1911
2012{-|
2113
@@ -38,6 +30,7 @@ import Json.Decode as Json
3830import VirtualDom
3931
4032
33+
4134-- MOUSE EVENTS
4235
4336
src/Element/Input.elm+40−36
@@ -1,35 +1,14 @@
1−module Element.Input
2− exposing
3− ( Label
4− , Option
5− , OptionState(..)
6− , Placeholder
7− , Thumb
8− , button
9− , checkbox
10− , currentPassword
11− , defaultCheckbox
12− , defaultThumb
13− , email
14− , focusedOnLoad
15− , labelAbove
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− )
1+module Element.Input exposing
2+ ( button
3+ , checkbox, defaultCheckbox
4+ , text, Placeholder, placeholder
5+ , username, newPassword, currentPassword, email, search, spellChecked
6+ , multiline
7+ , slider, Thumb, thumb, defaultThumb
8+ , radio, radioRow, Option, option, optionWith, OptionState(..)
9+ , Label, labelAbove, labelBelow, labelLeft, labelRight
10+ , focusedOnLoad
11+ )
3312
3413{-|
3514
@@ -42,9 +21,7 @@ module Element.Input
4221
4322@docs text, Placeholder, placeholder
4423
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.
47−
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.
4825
4926@docs username, newPassword, currentPassword, email, search, spellChecked
5027
@@ -197,6 +174,7 @@ button attrs { onPress, label } =
197174focusDefault attrs =
198175 if List.any hasFocusStyle attrs then
199176 Internal.NoAttribute
177+
200178 else
201179 Internal.htmlClass "focusable"
202180
@@ -239,8 +217,10 @@ checkbox attrs { label, icon, checked, onChange } =
239217 \code ->
240218 if code == enter then
241219 Just <| onChange (not checked)
220+
242221 else if code == space then
243222 Just <| onChange (not checked)
223+
244224 else
245225 Nothing
246226 ]
@@ -257,6 +237,7 @@ checkbox attrs { label, icon, checked, onChange } =
257237 Html.Attributes.attribute "aria-checked" <|
258238 if checked then
259239 "true"
240+
260241 else
261242 "false"
262243 , Element.centerY
@@ -298,6 +279,7 @@ defaultThumb =
298279
299280 Input.slider
300281 [ Element.height (Element.px 30)
282+
301283 -- Here is where we're creating/styling the "track"
302284 , Element.behindContent
303285 (Element.el
@@ -509,16 +491,19 @@ slider attributes input =
509491 , if vertical then
510492 Internal.Attr <|
511493 Html.Attributes.attribute "orient" "vertical"
494+
512495 else
513496 Internal.NoAttribute
514497 , Element.width <|
515498 if vertical then
516499 Maybe.withDefault (Element.px 20) trackHeight
500+
517501 else
518502 Maybe.withDefault Element.fill trackWidth
519503 , Element.height <|
520504 if vertical then
521505 Maybe.withDefault Element.fill trackWidth
506+
522507 else
523508 Maybe.withDefault (Element.px 20) trackHeight
524509 ]
@@ -533,6 +518,7 @@ slider attributes input =
533518 ++ [ Element.behindContent <|
534519 if vertical then
535520 viewVerticalThumb factor thumbAttributes trackWidth
521+
536522 else
537523 viewHorizontalThumb factor thumbAttributes trackHeight
538524 ]
@@ -765,6 +751,7 @@ textHelper textInput attrs textOptions =
765751 |> (\x ->
766752 if x < 1 then
767753 1
754+
768755 else
769756 x
770757 )
@@ -863,6 +850,7 @@ textHelper textInput attrs textOptions =
863850 , Element.alpha
864851 (if textOptions.text == "" then
865852 1
853+
866854 else
867855 0
868856 )
@@ -918,7 +906,6 @@ text =
918906
919907
920908{-| If spell checking is available, this input will be spellchecked.
921−
922909-}
923910spellChecked :
924911 List (Attribute msg)
@@ -978,6 +965,7 @@ newPassword attrs pass =
978965 TextInputNode <|
979966 if pass.show then
980967 "text"
968+
981969 else
982970 "password"
983971 , spellchecked = False
@@ -1008,6 +996,7 @@ currentPassword attrs pass =
1008996 TextInputNode <|
1009997 if pass.show then
1010998 "text"
999+
10111000 else
10121001 "password"
10131002 , spellchecked = False
@@ -1181,6 +1170,7 @@ optionWith val view =
11811170 [ el None [] <|
11821171 if selected then
11831172 text ":D"
1173+
11841174 else
11851175 text ":("
11861176 , text "burrito"
@@ -1301,6 +1291,7 @@ radioHelper orientation attrs input =
13011291 status =
13021292 if Just val == input.selected then
13031293 Selected
1294+
13041295 else
13051296 Idle
13061297 in
@@ -1364,6 +1355,7 @@ radioHelper orientation attrs input =
13641355 NotFound ->
13651356 if Just val == input.selected then
13661357 ( BeforeFound, prev, nxt )
1358+
13671359 else
13681360 ( found, val, nxt )
13691361
@@ -1452,6 +1444,7 @@ radioHelper orientation attrs input =
14521444 attrs
14531445 in
14541446 Internal.StyleClass Flag.transparency (Internal.Transparency "transparent" 1.0) :: pseudos
1447+
14551448 else
14561449 []
14571450
@@ -1492,12 +1485,16 @@ radioHelper orientation attrs input =
14921485 \code ->
14931486 if code == leftArrow then
14941487 Just (input.onChange prev)
1488+
14951489 else if code == upArrow then
14961490 Just (input.onChange prev)
1491+
14971492 else if code == rightArrow then
14981493 Just (input.onChange next)
1494+
14991495 else if code == downArrow then
15001496 Just (input.onChange next)
1497+
15011498 else if code == space then
15021499 case input.selected of
15031500 Nothing ->
@@ -1505,6 +1502,7 @@ radioHelper orientation attrs input =
15051502
15061503 _ ->
15071504 Nothing
1505+
15081506 else
15091507 Nothing
15101508 )
@@ -1642,6 +1640,7 @@ onKey desiredCode msg =
16421640 decode code =
16431641 if code == desiredCode then
16441642 Json.succeed msg
1643+
16451644 else
16461645 Json.fail "Not the enter key"
16471646
@@ -1797,6 +1796,7 @@ defaultCheckbox checked =
17971796 , Border.color <|
17981797 if checked then
17991798 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1799+
18001800 else
18011801 Element.rgb (211 / 255) (211 / 255) (211 / 255)
18021802 , Border.shadow <|
@@ -1806,17 +1806,20 @@ defaultCheckbox checked =
18061806 , color =
18071807 if checked then
18081808 Element.rgba (238 / 255) (238 / 255) (238 / 255) 0
1809+
18091810 else
18101811 Element.rgb (238 / 255) (238 / 255) (238 / 255)
18111812 }
18121813 , Background.color <|
18131814 if checked then
18141815 Element.rgb (59 / 255) (153 / 255) (252 / 255)
1816+
18151817 else
18161818 white
18171819 , Border.width <|
18181820 if checked then
18191821 0
1822+
18201823 else
18211824 1
18221825 ]
@@ -1837,6 +1840,7 @@ defaultCheckbox checked =
18371840 }
18381841 ]
18391842 Element.none
1843+
18401844 else
18411845 Element.none
18421846 )
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)
22
33{-| Notes from the `Html.Keyed` on how keyed works:
44
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)
22
33{-| -}
44
@@ -67,6 +67,7 @@ flag i =
6767 if i > 31 then
6868 Second
6969 (Bitwise.shiftLeftBy (i - 32) 1)
70+
7071 else
7172 Flag
7273 (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)
22
33{-| Relative positioning within a grid.
44
@@ -80,10 +80,12 @@ createGrid ( spacingX, spacingY ) nearby =
8080 [ 1
8181 , if Nothing == nearby.above then
8282 0
83+
8384 else
8485 1
8586 , if Nothing == nearby.below then
8687 0
88+
8789 else
8890 1
8991 ]
@@ -93,10 +95,12 @@ createGrid ( spacingX, spacingY ) nearby =
9395 [ 1
9496 , if Nothing == nearby.left then
9597 0
98+
9699 else
97100 1
98101 , if Nothing == nearby.right then
99102 0
103+
100104 else
101105 1
102106 ]
@@ -107,6 +111,7 @@ createGrid ( spacingX, spacingY ) nearby =
107111 , primary = 1
108112 , below = 2
109113 }
114+
110115 else
111116 { above = 1
112117 , primary = 2
@@ -119,6 +124,7 @@ createGrid ( spacingX, spacingY ) nearby =
119124 , primary = 1
120125 , right = 2
121126 }
127+
122128 else
123129 { left = 1
124130 , 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)
22
33{-| -}
44
@@ -275,6 +275,7 @@ finalizeNode has node attributes children embedMode parentContext =
275275 AsRow ->
276276 if Flag.present Flag.widthFill has && not (Flag.present Flag.widthBetween has) then
277277 html
278+
278279 else if Flag.present Flag.alignRight has then
279280 Html.u
280281 [ Html.Attributes.class
@@ -288,6 +289,7 @@ finalizeNode has node attributes children embedMode parentContext =
288289 )
289290 ]
290291 [ html ]
292+
291293 else if Flag.present Flag.centerX has then
292294 Html.s
293295 [ Html.Attributes.class
@@ -301,12 +303,14 @@ finalizeNode has node attributes children embedMode parentContext =
301303 )
302304 ]
303305 [ html ]
306+
304307 else
305308 html
306309
307310 AsColumn ->
308311 if Flag.present Flag.heightFill has && not (Flag.present Flag.heightBetween has) then
309312 html
313+
310314 else if Flag.present Flag.centerY has then
311315 Html.s
312316 [ Html.Attributes.class
@@ -319,6 +323,7 @@ finalizeNode has node attributes children embedMode parentContext =
319323 )
320324 ]
321325 [ html ]
326+
322327 else if Flag.present Flag.alignBottom has then
323328 Html.u
324329 [ Html.Attributes.class
@@ -331,6 +336,7 @@ finalizeNode has node attributes children embedMode parentContext =
331336 )
332337 ]
333338 [ html ]
339+
334340 else
335341 html
336342
@@ -349,6 +355,7 @@ embedWith static opts styles children =
349355 |> toStyleSheet opts
350356 )
351357 :: children
358+
352359 else
353360 (styles
354361 |> List.foldl reduceStyles ( Set.empty, [ renderFocusStyle opts.focus ] )
@@ -372,6 +379,7 @@ embedKeyed static opts styles children =
372379 |> toStyleSheet opts
373380 )
374381 :: children
382+
375383 else
376384 ( "dynamic-stylesheet"
377385 , styles
@@ -397,6 +405,7 @@ reduceStylesRecursive cache found styles =
397405 in
398406 if Set.member styleName cache then
399407 reduceStylesRecursive cache found remaining
408+
400409 else
401410 reduceStylesRecursive (Set.insert styleName cache) (head :: found) remaining
402411
@@ -409,6 +418,7 @@ reduceStyles style (( cache, existing ) as nevermind) =
409418 in
410419 if Set.member styleName cache then
411420 nevermind
421+
412422 else
413423 ( Set.insert styleName cache
414424 , style :: existing
@@ -434,6 +444,7 @@ reduceRecursiveCalcName found styles =
434444 headOfList :: other :: remaining ->
435445 if headOfList /= other then
436446 reduceRecursiveCalcName (headOfList :: found) (other :: remaining)
447+
437448 else
438449 reduceRecursiveCalcName found (other :: remaining)
439450
@@ -450,6 +461,7 @@ reduceRecursive found styles =
450461 ( headOfListName, headOfList ) :: ( otherName, other ) :: remaining ->
451462 if headOfListName /= otherName then
452463 reduceRecursive (headOfList :: found) (( otherName, other ) :: remaining)
464+
453465 else
454466 reduceRecursive found (( otherName, other ) :: remaining)
455467
@@ -674,6 +686,7 @@ skippable flag style =
674686
675687 _ ->
676688 False
689+
677690 else
678691 case style of
679692 FontSize i ->
@@ -719,6 +732,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
719732 Class flag exactClassName ->
720733 if Flag.present flag has then
721734 gatherAttrRecursive classes node has transform styles attrs children remaining
735+
722736 else
723737 gatherAttrRecursive (exactClassName ++ " " ++ classes) node (Flag.add flag has) transform styles attrs children remaining
724738
@@ -728,6 +742,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
728742 StyleClass flag style ->
729743 if Flag.present flag has then
730744 gatherAttrRecursive classes node has transform styles attrs children remaining
745+
731746 else if skippable flag style then
732747 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
733748 node
@@ -737,6 +752,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
737752 attrs
738753 children
739754 remaining
755+
740756 else
741757 gatherAttrRecursive (getStyleName style ++ " " ++ classes)
742758 node
@@ -760,6 +776,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
760776 Width width ->
761777 if Flag.present Flag.width has then
762778 gatherAttrRecursive classes node has transform styles attrs children remaining
779+
763780 else
764781 case width of
765782 Px px ->
@@ -792,6 +809,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
792809 attrs
793810 children
794811 remaining
812+
795813 else
796814 gatherAttrRecursive (classes ++ " " ++ Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion)
797815 node
@@ -829,6 +847,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
829847 Height height ->
830848 if Flag.present Flag.height has then
831849 gatherAttrRecursive classes node has transform styles attrs children remaining
850+
832851 else
833852 case height of
834853 Px px ->
@@ -868,6 +887,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
868887 attrs
869888 children
870889 remaining
890+
871891 else
872892 gatherAttrRecursive (classes ++ " " ++ (Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion))
873893 node
@@ -919,8 +939,10 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
919939 Heading i ->
920940 if i <= 1 then
921941 gatherAttrRecursive classes (addNodeName "h1" node) has transform styles attrs children remaining
942+
922943 else if i < 7 then
923944 gatherAttrRecursive classes (addNodeName ("h" ++ String.fromInt i) node) has transform styles attrs children remaining
945+
924946 else
925947 gatherAttrRecursive classes (addNodeName "h6" node) has transform styles attrs children remaining
926948
@@ -1037,6 +1059,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
10371059 newClasses =
10381060 if location == Behind then
10391061 Internal.Style.classes.hasBehind ++ " " ++ classes
1062+
10401063 else
10411064 classes
10421065 in
@@ -1045,6 +1068,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
10451068 AlignX x ->
10461069 if Flag.present Flag.xAlign has then
10471070 gatherAttrRecursive classes node has transform styles attrs children remaining
1071+
10481072 else
10491073 gatherAttrRecursive (alignXName x ++ " " ++ classes)
10501074 node
@@ -1071,6 +1095,7 @@ gatherAttrRecursive classes node has transform styles attrs children elementAttr
10711095 AlignY y ->
10721096 if Flag.present Flag.yAlign has then
10731097 gatherAttrRecursive classes node has transform styles attrs children remaining
1098+
10741099 else
10751100 gatherAttrRecursive (alignYName y ++ " " ++ classes)
10761101 node
@@ -1114,6 +1139,7 @@ renderWidth w =
11141139 , Internal.Style.classes.widthFill
11151140 , []
11161141 )
1142+
11171143 else
11181144 ( Flag.add Flag.widthFill Flag.none
11191145 , Internal.Style.classes.widthFillPortion ++ " width-fill-" ++ String.fromInt portion
@@ -1195,6 +1221,7 @@ renderHeight h =
11951221 , Internal.Style.classes.heightFill
11961222 , []
11971223 )
1224+
11981225 else
11991226 ( Flag.add Flag.heightFill Flag.none
12001227 , Internal.Style.classes.heightFillPortion ++ " height-fill-" ++ String.fromInt portion
@@ -1323,6 +1350,7 @@ createElement context children rendered =
13231350 ( html context :: htmls
13241351 , existingStyles
13251352 )
1353+
13261354 else
13271355 ( html context :: htmls
13281356 , existingStyles
@@ -1333,13 +1361,16 @@ createElement context children rendered =
13331361 ( styled.html NoStyleSheet context :: htmls
13341362 , if List.isEmpty existingStyles then
13351363 styled.styles
1364+
13361365 else
13371366 styled.styles ++ existingStyles
13381367 )
1368+
13391369 else
13401370 ( styled.html NoStyleSheet context :: htmls
13411371 , if List.isEmpty existingStyles then
13421372 styled.styles
1373+
13431374 else
13441375 styled.styles ++ existingStyles
13451376 )
@@ -1361,16 +1392,19 @@ createElement context children rendered =
13611392 ( VirtualDom.text
13621393 (if context == asParagraph then
13631394 str ++ " "
1395+
13641396 else
13651397 str
13661398 )
13671399 :: htmls
13681400 , existingStyles
13691401 )
1402+
13701403 else
13711404 ( textElement
13721405 (if context == asParagraph then
13731406 str ++ " "
1407+
13741408 else
13751409 str
13761410 )
@@ -1388,6 +1422,7 @@ createElement context children rendered =
13881422 ( ( key, html context ) :: htmls
13891423 , existingStyles
13901424 )
1425+
13911426 else
13921427 ( ( key, html context ) :: htmls
13931428 , existingStyles
@@ -1399,13 +1434,16 @@ createElement context children rendered =
13991434 :: htmls
14001435 , if List.isEmpty existingStyles then
14011436 styled.styles
1437+
14021438 else
14031439 styled.styles ++ existingStyles
14041440 )
1441+
14051442 else
14061443 ( ( key, styled.html NoStyleSheet context ) :: htmls
14071444 , if List.isEmpty existingStyles then
14081445 styled.styles
1446+
14091447 else
14101448 styled.styles ++ existingStyles
14111449 )
@@ -1424,6 +1462,7 @@ createElement context children rendered =
14241462 , VirtualDom.text
14251463 (if context == asParagraph then
14261464 str ++ " "
1465+
14271466 else
14281467 str
14291468 )
@@ -1431,11 +1470,13 @@ createElement context children rendered =
14311470 :: htmls
14321471 , existingStyles
14331472 )
1473+
14341474 else
14351475 ( ( key
14361476 , textElement
14371477 (if context == asParagraph then
14381478 str ++ " "
1479+
14391480 else
14401481 str
14411482 )
@@ -1455,6 +1496,7 @@ createElement context children rendered =
14551496 newStyles =
14561497 if List.isEmpty styles then
14571498 rendered.styles
1499+
14581500 else
14591501 rendered.styles ++ styles
14601502 in
@@ -1482,6 +1524,7 @@ createElement context children rendered =
14821524 newStyles =
14831525 if List.isEmpty styles then
14841526 rendered.styles
1527+
14851528 else
14861529 rendered.styles ++ styles
14871530 in
@@ -1520,6 +1563,7 @@ staticRoot =
15201563addWhen ifThis x to =
15211564 if ifThis then
15221565 x :: to
1566+
15231567 else
15241568 to
15251569
@@ -1550,18 +1594,21 @@ filter attrs =
15501594 Width width ->
15511595 if Set.member "width" has then
15521596 ( found, has )
1597+
15531598 else
15541599 ( x :: found, Set.insert "width" has )
15551600
15561601 Height height ->
15571602 if Set.member "height" has then
15581603 ( found, has )
1604+
15591605 else
15601606 ( x :: found, Set.insert "height" has )
15611607
15621608 Describe description ->
15631609 if Set.member "described" has then
15641610 ( found, has )
1611+
15651612 else
15661613 ( x :: found, Set.insert "described" has )
15671614
@@ -1571,18 +1618,21 @@ filter attrs =
15711618 AlignX _ ->
15721619 if Set.member "align-x" has then
15731620 ( found, has )
1621+
15741622 else
15751623 ( x :: found, Set.insert "align-x" has )
15761624
15771625 AlignY _ ->
15781626 if Set.member "align-y" has then
15791627 ( found, has )
1628+
15801629 else
15811630 ( x :: found, Set.insert "align-y" has )
15821631
15831632 TransformComponent _ _ ->
15841633 if Set.member "transform" has then
15851634 ( found, has )
1635+
15861636 else
15871637 ( x :: found, Set.insert "transform" has )
15881638 )
@@ -1598,6 +1648,7 @@ get attrs isAttr =
15981648 (\x found ->
15991649 if isAttr x then
16001650 x :: found
1651+
16011652 else
16021653 found
16031654 )
@@ -2030,6 +2081,7 @@ toStyleSheetString options stylesheet =
20302081 renderProps force (Property key val) existing =
20312082 if force then
20322083 existing ++ "\n " ++ key ++ ": " ++ val ++ " !important;"
2084+
20332085 else
20342086 existing ++ "\n " ++ key ++ ": " ++ val ++ ";"
20352087
@@ -2519,6 +2571,7 @@ formatBoxShadow shadow =
25192571 List.filterMap identity
25202572 [ if shadow.inset then
25212573 Just "inset"
2574+
25222575 else
25232576 Nothing
25242577 , Just <| String.fromFloat (Tuple.first shadow.offset) ++ "px"
@@ -2533,6 +2586,7 @@ boxShadowName shadow =
25332586 String.concat <|
25342587 [ if shadow.inset then
25352588 "box-inset"
2589+
25362590 else
25372591 "box-"
25382592 , String.fromFloat (Tuple.first shadow.offset) ++ "px"