ACTION-76: Review Mats Palmgren's Mozilla MQ preference exposure feature

Review Mats Palmgren's Mozilla MQ preference exposure feature

James Craig
Due on:
November 28, 2013
Created on:
November 21, 2013
Associated Product:
IndieUI: User Context 1.0
Related emails:
No related emails

Related notes:

From Mats:

The work was done in Mozilla bug 677302
and my proposal was to use a media expression, for example:

@media print and (-moz-preference "print.print_color" : true) {

see comment 8 for details:

An alternative was to use an @-rule like so:
'@-moz-preference' '(' <pref-name> ',' <pref-value> ')' '{' <rule>* '}'


James Craig, 21 Nov 2013, 02:01:24

My response:

Yes. I sent it to the www-style and web-apps list, but got some feedback that only portions of it should be MQs, so the rest will end up being a JavaScript interface unrelated to matchMedia.

I would recommend waiting a few weeks to review the ED, because I’m going to try to incorporate all the TPAC feedback soon. However, if you’re really curious, here are some links.

Newer media-query approach…

But ED updates will also reintroduce the JS API from the previous drafts…

So your example could use “moz” in the optional taxonomy param, and do something like this:

var printColor = navigator.settings.valueForKey("print.print_color", "moz”);

And potentially something like this:

@media print and (user-color-luminosity > 40%) { … }

See the www-style thread between Tab and me, starting here.

By thread:

James Craig, 21 Nov 2013, 02:02:39

Reviewed and replied.

James Craig, 4 May 2014, 03:58:36

Display change log.

Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <>.
$Id: 76.html,v 1.1 2016/04/04 15:09:40 ted Exp $