W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2014

Re: [light] CfC to remove LightLevelEvent from Ambient Light API (implies LC return); deadline 30 May 2014.

From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
Date: Wed, 28 May 2014 16:54:09 +0000
To: W3C Device APIs WG <public-device-apis@w3.org>
Message-ID: <38B8BDC3-7587-4638-848A-CA5E8EB3A6B0@intel.com>
On 27 May 2014, at 11:00, Kostiainen, Anssi <anssi.kostiainen@intel.com> wrote:

> On 23 May 2014, at 18:57, Frederick Hirsch <w3c@fjhirsch.com> wrote:
>> This is a Call for Consensus to update the Ambient Light specification [1] by removing the LightLevelEvent entirely. 
> +1
> This will allow us to align the spec with the implementations and pass the interop.

As a further data point to support this, I’d like to point out that Media Queries Level 4 defines the “light-level” media feature (dim | normal | washed) [1] which nicely maps to the LightLevelEvent.

This means you can do this in CSS:

@media (light-level: washed) {
/* Styles for an exceptionally bright environment go here. */

And in JavaScript:

if (window.matchMedia(“(light-level: dim)").matches) {
  console.log(‘The device is used in a dim environment.’);

This media feature nicely complements the DeviceLightEvent which provides more granularity, but overlaps with the LightLevelEvent which we plan to drop from the Ambient Light Events spec.



[1] http://dev.w3.org/csswg/mediaqueries4/#light-level
Received on Wednesday, 28 May 2014 16:55:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:08 UTC