git.iko.soy/typeable/elm-ui
on master help sign in
minor cleanup
70a3056Matthew Griffith
src/Internal/Model.elm+15−13
@@ -454,7 +454,10 @@ finalizeNode has node attributes children embedMode parentContext =
454 Embedded nodeName internal ->
454 Embedded nodeName internal ->
455 VirtualDom.node nodeName
455 VirtualDom.node nodeName
456 attributes
456 attributes
457+ [ createNode internal
458+ [ Html.Attributes.class
457− [ createNode internal [ Html.Attributes.class (classes.any ++ " " ++ classes.single) ]
459+ (classes.any ++ " " ++ classes.single)
460+ ]
458 ]
461 ]
459 in
462 in
460 case parentContext of
463 case parentContext of
@@ -551,26 +554,25 @@ embedWith static opts styles children =
551
554
552
555
553embedKeyed static opts styles children =
556embedKeyed 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
554 if static then
566 if static then
555 ( "static-stylesheet", staticRoot opts )
567 ( "static-stylesheet", staticRoot opts )
556 :: ( "dynamic-stylesheet"
568 :: ( "dynamic-stylesheet"
557− , styles
569+ , dynamicStyleSheet
558− |> List.foldl reduceStyles ( Set.empty, renderFocusStyle opts.focus )
559− |> Tuple.second
560− -- |> reduceStylesRecursive Set.empty [ ]) --renderFocusStyle opts.focus ]
561− -- |> sortedReduce
562− |> toStyleSheet opts
563 )
570 )
564 :: children
571 :: children
565
572
566 else
573 else
567 ( "dynamic-stylesheet"
574 ( "dynamic-stylesheet"
568− , styles
575+ , dynamicStyleSheet
569− |> List.foldl reduceStyles ( Set.empty, renderFocusStyle opts.focus )
570− |> Tuple.second
571− -- |> reduceStylesRecursive Set.empty [ ]) --renderFocusStyle opts.focus ]
572− -- |> sortedReduce
573− |> toStyleSheet opts
574 )
576 )
575 :: children
577 :: children
576
578