mdgriffith / style-elements

Create styles that don't mysteriously break!
http://package.elm-lang.org/packages/mdgriffith/style-elements/latest
BSD 3-Clause "New" or "Revised" License
445 stars 49 forks source link

Allow setting :visited styles on a link #150

Open xtian opened 6 years ago

xtian commented 6 years ago

The big picture of what I'm trying to do

I'm trying to add visited styles to a link. In some cases (e.g., a long list of links or links embedded into body copy) this can be a useful affordance for users. It doesn't seem like this is possible currently, however.

What I did

styleSheet : Style.Stylesheet Styles variation
styleSheet =
    Style.stylesheet
        [ Style.style Link
            [ Style.Color.text blue
            , Style.pseudo "visited" [ Style.Color.text purple ]
            ]
        ]

What I Expected To Happen

I expected visited links to change text color.

What Actually Happened

The link styles were assigned to an element internal to the <a> so the visited styling did not take effect.

Versions