-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mediaqueries-5] Clarify definition and use cases for light-level feature #1727
Comments
No, that's one of the use-cases. The other is what it's named after - adjusting content to the ambient light level.
Isn't that precisely what the spec already says? The note is pretty explicit that lux is one component of the value, and that screen tech/etc are also important. |
True, informative note has very good points, however, normative prose is bit misleading. Thus, following statement "The light-level media feature is used to query about the ambient light-level in which the device is used," is misleading, since ambient light level is the same. I think it would be good to redefine 'ambient light level' term (similar to CSS pixels vs pixels) or create new term to avoid confusion. For example:
Or:
/CC @anssiko the current ALS spec editor. |
I agree with @alexshalamov's reasoning that there's confusion due to the terminology used. In addition, I'd propose you consider renaming the I believe the CSS WG is in the best position to pick a better name for this media feature considering consistency across various CSS features, so I leave the naming issue to the group. The Device and Sensors WG responsible for the Ambient Light Sensor API has bi-weekly calls, so should this topic need further discussion, we'd be happy to invite interested people from the CSS WG to join our call, or alternatively, we could join one of the CSS WG calls. |
The name The values are also accurately described according to their function; they very vaguely refer to light levels, but more importantly dictate what is happening to the page in each case, which the author should respond to. I think y'all are overthinking this and confusing yourselves. ^_^ |
As said, I leave the That said, I think you should incorporate @alexshalamov's informative (i.e. not web-facing) clarifications into the spec prose, but then again, I will not oppose if you prefer not to do so. |
The light-level feature has been removed altogether, as it had become redundant with other media features. See #5359 for how the decision was made, and https://drafts.csswg.org/mediaqueries-5/#auto-pref (and in particular example 54) for how scenarios previously covered by light-level can be covered by other media features. |
Spec: https://drafts.csswg.org/mediaqueries-5/#descdef-media-light-level
We had a discussion about ambient light sensor use cases, security and privacy, in particular how light-level is mapped to ambient light sensor measurements.
From the MQ5 spec, it looks like the main use case is web content contrast adjustment / accessibility.
The spec defines the light-level as:
then later:
That sounds like light-level values are not directly mapped to ambient light (lux) values in which device is used.
Would it be better to define light-level as a hint, whose values would be derived from ambient light measurements, screen brightness, screen technology, etc. Based on the hint, web page could adjust contrast ratio.
The text was updated successfully, but these errors were encountered: