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

Overriding Styles not Working in Special Cases #12

@k15a

Description

@k15a

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" ]
            ]
        ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions