Skip to content

Commit 81355cb

Browse files
committed
Clarify what 'unknown' does for things other than <media-query>. Clarify what unknown media features turn into in general.
1 parent 7648f9e commit 81355cb

File tree

2 files changed

+1295
-2962
lines changed

2 files changed

+1295
-2962
lines changed

mediaqueries/Overview.bs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,15 @@ Syntax</h2>
782782
The result is the result of evaluating the specified media feature.
783783
</dl>
784784

785-
If the result of a <a>media query</a> is unknown,
786-
it must be treated as false for the purpose of matching.
785+
If the result of any of the above productions
786+
is used in any context that expects a two-valued boolean,
787+
"unknown" must be converted to "false".
788+
789+
Note: This means that,
790+
for example,
791+
when a <a>media query</a> is used in a ''@media'' rule,
792+
if it resolves to "unknown" it's treated as "false"
793+
and fails to match.
787794

788795
<div class="note">
789796
Media Queries use a three-value logic where terms can be "true", "false", or "unknown".
@@ -800,7 +807,7 @@ Syntax</h2>
800807
This logic was adopted because <<general-enclosed>> needs to be assigned a truth value.
801808
In standard boolean logic, the only reasonable value is "false",
802809
but this means that ''not unknown(function)'' is true,
803-
which can be confusing an unwanted.
810+
which can be confusing and unwanted.
804811
Kleen's 3-valued logic ensures that unknown things will prevent a <a>media query</a> from matching,
805812
unless their value is irrelevant to the final result.
806813
</div>
@@ -856,7 +863,8 @@ Error Handling</h3>
856863
</div>
857864

858865
An unknown <<mf-name>> or <<mf-value>>, or disallowed <<mf-value>>,
859-
must make the entire <<media-query>> be replaced by ''not all''.
866+
results in the value "unknown".
867+
A <<media-query>> whose value is "unknown" must be replaced with ''not all''.
860868

861869
<div class="example">
862870
<pre>&lt;link media="screen and (max-weight: 3kg) and (color), (color)"

0 commit comments

Comments
 (0)