git.iko.soy/typeable/elm-ui
on master help sign in
minor cleanup
commit70a3056131dde63b86ec86b053dd2de16fb387b0 authorMatthew Griffith <mdg.griffith@gmail.com> dateSat 13 Jul 2019, 16:24 (7 years ago) parent0a8e95a
1 file changed+15−13
src/Internal/Model.elm+15−13
src/Internal/Model.elm+15−13
@@ -454,7 +454,10 @@ finalizeNode has node attributes children embedMode parentContext =
454454 Embedded nodeName internal ->
455455 VirtualDom.node nodeName
456456 attributes
457− [ createNode internal [ Html.Attributes.class (classes.any ++ " " ++ classes.single) ]
457+ [ createNode internal
458+ [ Html.Attributes.class
459+ (classes.any ++ " " ++ classes.single)
460+ ]
458461 ]
459462 in
460463 case parentContext of
@@ -551,26 +554,25 @@ embedWith static opts styles children =
551554
552555
553556embedKeyed static opts styles children =
557+ let
558+ dynamicStyleSheet =
559+ styles
560+ |> List.foldl reduceStyles ( Set.empty, renderFocusStyle opts.focus )
561+ |> Tuple.second
562+ -- |> reduceStylesRecursive Set.empty [ ]) --renderFocusStyle opts.focus ]
563+ -- |> sortedReduce
564+ |> toStyleSheet opts
565+ in
554566 if static then
555567 ( "static-stylesheet", staticRoot opts )
556568 :: ( "dynamic-stylesheet"
557− , styles
558− |> List.foldl reduceStyles ( Set.empty, renderFocusStyle opts.focus )
559− |> Tuple.second
560− -- |> reduceStylesRecursive Set.empty [ ]) --renderFocusStyle opts.focus ]
561− -- |> sortedReduce
562− |> toStyleSheet opts
569+ , dynamicStyleSheet
563570 )
564571 :: children
565572
566573 else
567574 ( "dynamic-stylesheet"
568− , styles
569− |> List.foldl reduceStyles ( Set.empty, renderFocusStyle opts.focus )
570− |> Tuple.second
571− -- |> reduceStylesRecursive Set.empty [ ]) --renderFocusStyle opts.focus ]
572− -- |> sortedReduce
573− |> toStyleSheet opts
575+ , dynamicStyleSheet
574576 )
575577 :: children
576578