2

I want to print some articles from Wikipedia, but I want to remove the hyperlink underlines from all of the words in the print.


I'm using Wikipedia Account User Scripts Custom CSS to remove the links, but can't get it to work, the underlines still show up in Chrome's Print Preview. I created a Wikipedia vector.css theme override, and cleared browser cache, but I can't tell if the CSS is even applying.

Custom CSS

/* Remove Hyperlinks */
@media print {
    a:link {text-decoration: none !important;}
    a[href]:after {content: none !important;}
}

Wikipedia Account Gadgets Print Options

I'm also using Gadgets Print Options to remove other elements, such as reference number links.

Wikipedia Print Options


Chrome Print View

And Chrome's Print Preview features, to reformat the page for printing.

You can see here the link underlines in the preview.

Chrome Print View

Matt McManis
  • 4,475
  • 5
  • 38
  • 93

1 Answers1

5

Switch Chrome's rendering to print and you'll see they're cheating with border-bottom. You'll need to knock that out too:

/* Remove Hyperlinks */
@media print {
    a:link {
        border-bottom: none !important;
        text-decoration: none !important;
    }
    a[href]:after {
        content: none !important;
    }
}
Dispenser
  • 1,111
  • 7
  • 9