Skip to content

Commit 3f51bbd

Browse files
rcabanierfrivoal
authored andcommitted
Added the first proposal for a 'environment-blending' keyword. (w3c#2719)
1 parent 1d1e45d commit 3f51bbd

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

mediaqueries-5/Overview.bs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,59 @@ Detecting the ambient light level: the 'light-level' feature</h3>
148148
</pre>
149149
</div>
150150

151+
<h3 id="environment-blending">
152+
Detecting the display technology: the 'environment-blending' feature</h3>
153+
154+
<pre class='descdef mq'>
155+
Name: environment-blending
156+
Value: opaque | additive | subtractive
157+
For: @media
158+
Type: discrete
159+
</pre>
160+
161+
The 'environment-blending' media feature is used to query the characteristics of the user's display
162+
so the author can adjust the style of the document.
163+
An author might choose to adjust the visuals and/or layout of the page depending on the display
164+
technology to increase the appeal or improve legibility.
165+
166+
The following values are valid:
167+
168+
<dl dfn-type=value dfn-for="@media/environment-blending">
169+
<dt><dfn>opaque</dfn>
170+
<dd>
171+
The document is rendered on an opaque medium, such as a traditional monitor or paper.
172+
Black is dark and white is 100% light.
173+
174+
<dt><dfn>additive</dfn>
175+
<dd>
176+
The display blends the colors of the canvas with the real world using additive mixing.
177+
Black is fully transparent and white is 100% light.
178+
179+
For example: a head-up display in a car.
180+
181+
<dt><dfn>subtractive</dfn>
182+
<dd>
183+
The display blends the colors of the canvas with the real world using subtractive mixing.
184+
White is fully transparent and dark colors have the most contrast.
185+
186+
For example: an LCD display embedded in a bathroom mirror.
187+
</dl>
188+
189+
Issue: Is there a need for the 'subtractive' value?
190+
191+
<div class="example">
192+
<pre>
193+
body { background-color: white; }
194+
p { color: black; }
195+
196+
@media(environment-blending: additive) {
197+
body { background-color: black; }
198+
p { color: white; font-size: 16px; font-weight: 1000; }
199+
}
200+
</pre>
201+
</div>
202+
203+
151204

152205
<!--
153206
██████ ██████ ████████ ████ ████████ ████████ ████ ██ ██ ██████

0 commit comments

Comments
 (0)