So according to dev.w3.org this is a thing:
@media (light-level: normal) {
p { background: url("texture.jpg"); color: #333 }
}
@media (light-level: dim) {
p { background: #222; color: #ccc }
}
@media (light-level: washed) {
p { background: white; color: black; font-size: 2em; }
}
It lets you adjust CSS according to the light level of the device. I went through some articles but couldn't find anything about support. I was wondering what the support of these media queries are? Are they already implemented on some browsers?
Source:
http://dev.w3.org/csswg/mediaqueries4/#light-level
[ moving to answer per peoples suggestions ]
http://caniuse.com/css-mediaqueries -- for the farther-future and 3 versions ahead looks like chrome and ff might be your only hope in using these right now. Since they are part of a spec that's still being written, more than likely you'll find early adopters in chrome, ff, and maybe ie10. If this isn't working in chrome, ff, the previous spec called it "luminosity" instead of light-level ex: http://www.jordanm.co.uk/post/65776639602/responding-to-environmental-lighting-with-css-media
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With