DEV Community

Discussion on: Understanding pseudo elements: Display hrefs in printed documents

Collapse
 
havardob profile image
Håvard Brynjulfsen

Such an easy solution, thanks!

If you don't want to anchor links to display their destination, and you only want to write out the URLs and e-mail addresses you can change it to this:

    a[href*="http"]:after,
    a[href*="mailto:"]:after {
        content: ' ('attr(href) ') ';
    }
Collapse
 
boyum profile image
Sindre Bøyum

That's a really nice suggestion, thanks!