Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Overriding Styles not Working in Special Cases #12

Open
k15a opened this issue Mar 21, 2017 · 0 comments
Open

Overriding Styles not Working in Special Cases #12

k15a opened this issue Mar 21, 2017 · 0 comments
Labels

Comments

@k15a
Copy link
Member

k15a commented Mar 21, 2017

If the overwritten styles are already injected the order of the rules are different.

button =
    styled Html.button
        [ backgroundColor white
        , color pink
        , fontSize (Styled.em 1)
        , margin (Styled.em 1)
        , padding2 (Styled.em 0.25) (Styled.em 1)
        , border (px 2) solid pink
        , borderRadius (px 3)
        ]


primaryButton =
    styled button
        [ backgroundColor pink
        , color white
        ]


wrapper =
    styled Html.div
        [ backgroundColor pink
        , color white
        ]


main =
    div
        []
        [ wrapper []
            [ button [] [ text "Normal" ]
            , primaryButton [] [ text "Primary" ]
            ]
        ]
@k15a k15a added the bug label Mar 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant