@@ -2272,88 +2272,6 @@ Video Display Resolution: the 'video-resolution' feature
2272
2272
2273
2273
Environment Media Features
2274
2274
2275
-
2276
- Detecting the ambient light level: the 'light-level' feature
2277
-
2278
-
2279
- Name : light-level
2280
- Value : dim | normal | washed
2281
- For : @media
2282
- Type : discrete
2283
-
2284
-
2285
- The 'light-level' media feature is used to query about the ambient light-level in which the device is used,
2286
- to allow the author to adjust style of the document in response.
2287
- The following values are valid:
2288
-
2289
-
2290
- dim
2291
-
2292
- The device is used in a dim environment,
2293
- where excessive contrast and brightness would be distracting or uncomfortable to the reader.
2294
- For example: night time, or a dimly illuminated indoor environment.
2295
-
2296
- normal
2297
-
2298
- The device is used in a environment with a light level in the ideal range for the screen,
2299
- and which does not necessitate any particular adjustment.
2300
-
2301
- washed
2302
-
2303
- The device is used in an exceptionally bright environment,
2304
- causing the screen to be washed out and difficult to read.
2305
- For example: bright daylight.
2306
-
2307
-
2308
- User agents should set the thresholds between the three levels
2309
- in a way that takes into account the characteristics of the device.
2310
-
2311
-
2312
- Even though it is expected that User Agents will adjust the value of this media feature
2313
- based on ambient light sensors,
2314
- this specification intentionally refrains from defining the three levels in terms of a measurement in lux,
2315
- for several reasons:
2316
-
2317
-
2318
-
2319
- Devices equipped with a light sensor usually adjust the brightness of the screen automatically.
2320
- Depending on the level of adjustment,
2321
- the thresholds for needing a low contrast or high contrast content may vary.
2322
-
2323
-
2324
- Different screen technologies wash out at very different ambient light levels;
2325
- e-ink displays remain readable in bright daylight,
2326
- while liquid crystal displays do not.
2327
-
2328
-
2329
- Many embedded light sensors are inaccurately calibrated,
2330
- making it difficult to establish useful thresholds valid across devices.
2331
-
2332
-
2333
-
2334
- For accessibility purposes, user agents may offer manual controls
2335
- allowing the user to switch between the three levels of independently of the ambient light level,
2336
- as high contrast or low contrast styles may be more suitable for users with visual disabilities.
2337
-
2338
-
2339
- Using this media feature for accessibility purposes overlaps a lot with
the high-contrast media feature proposed by Microsoft .
2340
- Can we adjust this so that it covers all use cases for both,
2341
- or somehow modify them to work in an orthogonal, rather than overlapping, fashion?
2342
-
2343
-
2344
-
2345
- @media (light-level: normal) {
2346
- p { background: url("texture.jpg"); color: #333 }
2347
- }
2348
- @media (light-level: dim) {
2349
- p { background: #222; color: #ccc }
2350
- }
2351
- @media (light-level: washed) {
2352
- p { background: white; color: black; font-size: 2em; }
2353
- }
2354
-
2355
-
2356
-
2357
2275
2358
2276
Detecting the display technology: the 'environment-blending' feature
2359
2277
@@ -2959,6 +2877,51 @@ Detecting the desire for reduced data usage when loading a page: the 'prefers-re
2959
2877
2960
2878
2961
2879
2880
+
2881
+ Automatic handling of User Preferences
2882
+
2883
+ User agents may have explicit settings allowing users to indicate their preferences
2884
+ or may make the determination based on settings in the underlying operating system.
2885
+ User agents may also automatically infer the preferences of the user
2886
+ based on knowledge about the device, the environment, etc.
2887
+ In such case, it is recommended that they also offer a way for users to opt out of
2888
+ or override the automatically determined preferences.
2889
+
2890
+
2891
+ In addition to allowing users to explicitly choose
2892
+ between a preference for a ''prefers-color-scheme/light'' or ''prefers-color-scheme/dark'' color scheme,
2893
+ a user agent could have a mode where the determination is automatically made based on the current time,
2894
+ expressing a preference for ''prefers-color-scheme/dark'' between sunset and dawn.
2895
+
2896
+
2897
+
2898
+ Depending on the type of display used,
2899
+ changes in the ambient light level may make the reading experience difficult or uncomfortable.
2900
+
2901
+ For instance, liquid crystal displays can be washed out and very hard to read
2902
+ in brightly lit environments.
2903
+ A device with such a screen and with an ambient light sensor
2904
+ could automatically switch 'prefers-contrast' to ''prefers-contrast/high''
2905
+ when it detects conditions that would make the screen difficult to read.
2906
+ A user agent on a device with an e-ink display
2907
+ would not make the same adjustment,
2908
+ as such displays remain readable in bright daylight.
2909
+
2910
+ In the opposite situation,
2911
+ user agents running of device with a light-emitting screen (LCD, OLED, etc.)
2912
+ and an ambient light sensor
2913
+ could automatically switch 'prefers-contrast' to ''prefers-contrast/low''
2914
+ and 'prefers-color-scheme' to ''prefers-color-scheme/dark''
2915
+ when used in a dim environment
2916
+ where excessive contrast and brightness would be distracting or uncomfortable to the reader.
2917
+
2918
+
2919
+
2920
+ A user agent could automatically switch between ''prefers-reduced-data: no-preference'' and ''prefers-reduced-data/reduce''
2921
+ depending on whether the network connection in use
2922
+ allows for unlimited data or is on a metered plan.
2923
+
2924
+
2962
2925
You can’t perform that action at this time.