elm-styled icon indicating copy to clipboard operation
elm-styled copied to clipboard

Overriding Styles not Working in Special Cases

Open k15a opened this issue 7 years ago • 0 comments

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 avatar Mar 21 '17 08:03 k15a