0

Can anyone kindly give me a hand. I need a second pair of eyes. Im trying to print some css using js.

this.$el.find(".button").css({
  'border': 'none',
  'box-shadow': box_shadow,
  'background-color': params.button_bg_color,
  'background-image': 'linear-gradient(to bottom, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
  'background-image': '-webkit-gradient(linear, left top, left bottom, from(' + params.button_bg_color + '), to(' + params.button_hvr_color + '))',
  'background-image': '-webkit-linear-gradient(top, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
  'background-image': '-moz-linear-gradient(top, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
  'background-image': '-webkit-linear-gradient(top, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
  'background-image': '-o-linear-gradient(top, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
  'background-image': 'ms-linear-gradient(to bottom, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
});

The border, box-shadow, and background-color are printing. But none of the background-image. I know my var values are good, and I know I can inline the gradients. I have already eliminated those two. Any help would be greatly appreciated.

Cheers!

UPDATE

Very strangely, at least to me. If I remove these 2 this works...

'background-image': '-o-linear-gradient(top, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',
'background-image': 'ms-linear-gradient(to bottom, ' + params.button_bg_color + ', ' + params.button_hvr_color + ')',

Any thoughts on why this is this case. Im now extremely confused.

Ikhlak S.
  • 8,578
  • 10
  • 57
  • 77
sean
  • 119
  • 5
  • 13
  • Possible duplicate of [CSS @media print issues with background-color;](http://stackoverflow.com/questions/3893986/css-media-print-issues-with-background-color) – Jaydo Apr 19 '16 at 04:46
  • I'm just guessing, have you tried all browsers? – ArchLicher Apr 19 '16 at 04:47
  • Nothing in that post seemed to help, the exact and important... And no not all browsers but safari, FF, and chrome I did try and no go. To me it looks right but im really lost, been spending the past 2 hours on this. I have also tried double instead of single quotes. – sean Apr 19 '16 at 05:00
  • just posted an interesting update – sean Apr 19 '16 at 05:23

0 Answers0