10

Is it possible to entirely disable any preconfigured @media print css styles from bootstrap without having to recompile it?

The print styles applied by default could be seen here: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L6837

I want my webpage to be printed just as seen, with all css tags applied. Especially colors, like:

b {
  color: #ff0000;
}

In order to disable the print styles from bootstrap, I'd have to explicit override every property again with my custom styles, eg:

b {
  color: #ff0000 !important;
}

But isn't there a global way to disable these default print styles?

membersound
  • 81,582
  • 193
  • 585
  • 1,120

1 Answers1

12

You can download custom bootstrap without media print. http://getbootstrap.com/customize/

just uncheck

Print media styles

Dionys
  • 3,083
  • 1
  • 19
  • 28
  • Hm that's nice in general, but I'd like to stick to the remote stylesheet imports, like ``. – membersound Jan 27 '16 at 14:07
  • Then you could create your own maxcdn link with the custom downloaded boostrap – Dionys Jan 27 '16 at 14:09
  • Possibly there is not better solution and probably not possible to "deactivate" the css print tags entirely. – membersound Jan 28 '16 at 11:37
  • @membersound - I have a long winded explanation in agreement [here](http://stackoverflow.com/questions/33410724/bootstrap-print-css-removes-background-color/36742058#36742058). –  Apr 20 '16 at 12:10