Skip to content

Commit

Permalink
Use span instead of div for DarkReader fix
Browse files Browse the repository at this point in the history
See #542
  • Loading branch information
rtfeldman authored Oct 15, 2021
1 parent e9ccc93 commit 79eb0fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Css/Global.elm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ global snippets =
|> VirtualDom.node "style" []
-- wrap the style node in a div to prevent `Dark Reader` from blowin up the dom.
|> List.singleton
|> VirtualDom.node "div" []
|> VirtualDom.node "span" []
|> VirtualDom.Styled.unstyledNode


Expand Down
2 changes: 1 addition & 1 deletion src/VirtualDom/Styled.elm
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ toKeyedStyleNode allStyles keyedChildNodes =
toStyleNode : Dict Classname (List Style) -> VirtualDom.Node msg
toStyleNode styles =
-- wrap the style node in a div to prevent `Dark Reader` from blowin up the dom.
VirtualDom.node "div"
VirtualDom.node "span"
[]
[ -- this <style> node will be the first child of the requested one
toDeclaration styles
Expand Down

0 comments on commit 79eb0fa

Please sign in to comment.