javascript

Bootstrap Print Overrides CSS  #angularjs #reactjs

  • As already discussed : Background color not showing in print preview
  • $(‘#filePrintPreview’).html(“TEST”); //way 1: pure JS exmple document.getElementById(‘filePrintPreview’).style.setProperty(‘color’, ‘red’, ‘important’); //way 2: wrapped inside jQuery’s each() example $(‘h3’).each(function() { this.style.setProperty(‘color’, ‘#12FF12’, ‘important’); }); @media print { .test { background-color: #1a4567 !
  • Stack Overflow works best with JavaScript enabled
  • I have the user to choose a color for the printed text.
  • If I add the media print CSS it does what it should, but I want the text-colors not the color set by CSS.

I haven’t figured out yet, how to get my actual text coloring. I want to get a div only shown on print with the Bootstrap class print-visible, works fine but all the coloring is lost in the preview.

@ng_real_ninja: Bootstrap Print Overrides CSS #angularjs #reactjs

As already discussed here: Background color not showing in print preview

I haven’t figured out yet, how to get my actual text coloring. I want to get a div only shown on print with the Bootstrap class print-visible, works fine but all the coloring is lost in the preview.

If I add the media print CSS it does what it should, but I want the text-colors not the color set by CSS.

DrDreo, yes you can but with JS though, edited above, hope helps. Regards. – Syden 4 hours ago

javascript