17

When I print a page from my Bootstrap-themed site, all the links (and images with attached urls) have a printed representation of the link inserted into the printed page, right after the linked object. I can see some situations where this would be helpful, but for now it's just messing up my printed layout. I smell jQuery at work here, but I can't figure out where it is or how I can turn it off. Any hints out there? Thanks!

1
  • 1
    FWIW: is Bootstrap related; not specific to Drupal nor jquery. Sep 2, 2015 at 12:06

1 Answer 1

32

Found it: it wasn't jQuery, but CSS3. Down in bootstrap.css, we find:

@media print {
  ...
  a[href]:after {
    content: " (" attr(href) ")";
  }
  ...
}

Overriding the style with content:none handles the situation fine. There are some similar :after clauses in there doing similar things, but this is working for now.

2
  • FYI, I first read this as hand-modifying bootstrap.css, which I was reluctant to do. Of course it isn't saying that: "overriding the style" just means putting a new definition in one's own style sheet, that is loaded after the bootstrap one. Probably obvious to most people, but I mention this in case anyone else has the same mis-interpretation I did. Sep 2, 2015 at 13:18
  • This odd design choice has been "fixed" in bootstrap 4.
    – BM5k
    Jan 6, 2016 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.