[mediaqueries4] New Media Feature "backgrounds" (Proposal)

Hi, I'd like to discuss having a media query determine if a device is capable of printing (or displaying) background colors or images.

The scenario:

If I have a page that uses background colors or images to highlight some data, I would like the opportunity to take alternative action if the device is not capable of showing those backgrounds.  For example, I could change the text attributes, or draw some borders around the area, or whatever.

It shouldn't make a difference to me as the page author if the user deactivates printing of background images on purpose, or if the device is physically incapable of displaying the backgrounds--I should just be able to handle the state with CSS.

The proposal:

Add a "Media Feature" called "backgrounds" which would have the values "off" or "on".

Usage example:

.importantData {
  background-color: silver;
}

@media print and (backgrounds:off) {
  .importantData {
    border: 1px solid gray;
  }
}


I think this is a better way to handle background printing than things like "-webkit-print-color-adjust: exact;" which take away the ability of user to make the decision.

Thanks for reading this,

Bill.

Received on Friday, 22 March 2013 19:17:52 UTC