Posted about 2 years ago. Visible to the public. Repeats. Linked content.

Printing background color of elements

Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spent tons of ink printing the background of a web page. But in some cases you want to print the background color of elements, e.g. bars of a chart. For those elements you need to set the following css styles:

Copy
-webkit-print-color-adjust: exact; /* Chrome and Safari */ color-adjust: exact; /* Firefox */

Note that if you're using autoprefixer, you don't need to add the prefixed variant yourself.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Natalie Krehan
Last edit:
4 months ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Natalie Krehan to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more