W3C home > Mailing lists > Public > www-style@w3.org > March 2013

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

From: Bill Friedrich <bill0f-y@yahoo.com>
Date: Fri, 22 Mar 2013 12:17:25 -0700 (PDT)
Message-ID: <1363979845.35752.YahooMailNeo@web126005.mail.ne1.yahoo.com>
To: "www-style@w3.org" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT