Skip to content

Commit d8e702d

Browse files
committed
[mediaqueries-4] Fix grammar so you can't just totally omit the comparator in range syntax. Fixes #2790.
1 parent 1163b38 commit d8e702d

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

mediaqueries-4/Overview.bs

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,11 @@ Using “min-” and “max-” Prefixes On Range Features</h4>
743743
it does not take into account the possibility of fractional viewport sizes which can occur as a result of non-integer pixel densities
744744
(e.g. on high-dpi displays or as a result of zooming/scaling).
745745
Any viewport widths that fall between 320px and 321px will result in none of the styles being applied.
746-
746+
747747
One approach to work around this problem is to increase the precision of the values used for the comparison. Using the example above,
748748
changing the second comparison value to 320.01px significantly reduces the change that a viewport width on a device would fall
749749
between the cracks.
750-
750+
751751
<pre>
752752
@media (max-width: 320px) { /* styles for viewports <= 320px */ }
753753
@media (min-width: 320.01px) { /* styles for viewports >= 320.01px */ }
@@ -869,12 +869,16 @@ Syntax</h2>
869869
<dfn>&lt;media-feature></dfn> = ( [ <<mf-plain>> | <<mf-boolean>> | <<mf-range>> ] )
870870
<dfn>&lt;mf-plain></dfn> = <<mf-name>> : <<mf-value>>
871871
<dfn>&lt;mf-boolean></dfn> = <<mf-name>>
872-
<dfn>&lt;mf-range></dfn> = <<mf-name>> [ '<' | '>' ]? '='? <<mf-value>>
873-
| <<mf-value>> [ '<' | '>' ]? '='? <<mf-name>>
874-
| <<mf-value>> '<' '='? <<mf-name>> '<' '='? <<mf-value>>
875-
| <<mf-value>> '>' '='? <<mf-name>> '>' '='? <<mf-value>>
872+
<dfn>&lt;mf-range></dfn> = <<mf-name>> <<mf-comparison>> <<mf-value>>
873+
| <<mf-value>> <<mf-comparison>> <<mf-name>>
874+
| <<mf-value>> <<mf-lt>> <<mf-name>> <<mf-lt>> <<mf-value>>
875+
| <<mf-value>> <<mf-gt>> <<mf-name>> <<mf-gt>> <<mf-value>>
876876
<dfn>&lt;mf-name></dfn> = <<ident>>
877877
<dfn>&lt;mf-value></dfn> = <<number>> | <<dimension>> | <<ident>> | <<ratio>>
878+
<dfn>&lt;mf-lt></dfn> = '<' '='?
879+
<dfn>&lt;mf-gt></dfn> = '>' '='?
880+
<dfn>&lt;mf-eq></dfn> = '='
881+
<dfn>&lt;mf-comparison></dfn> = <<mf-lt>> | <<mf-gt>> | <<mf-eq>>
878882

879883
<dfn>&lt;general-enclosed></dfn> = [ <<function-token>> <<any-value>> ) ] | ( <<ident>> <<any-value>> )
880884
</pre>
@@ -1735,19 +1739,19 @@ Note: the '@media/hover', '@media/any-hover', '@media/pointer', and '@media/any-
17351739
</style>
17361740
</div>
17371741

1738-
The 'pointer' and 'hover' features relate to the characteristics of the “primary” pointing device,
1742+
The 'pointer' and 'hover' features relate to the characteristics of the “primary” pointing device,
17391743
while 'any-pointer' and 'any-hover' can be used to query the properties of all potentially available pointing devices.
17401744

1741-
Note: While this specification does not define how user agents should decide what the “primary” pointing device is,
1742-
the expectation is that user agents should make this determination
1743-
by combining knowledge about the device/environment they are running on,
1744-
the number and type of pointing devices available,
1745+
Note: While this specification does not define how user agents should decide what the “primary” pointing device is,
1746+
the expectation is that user agents should make this determination
1747+
by combining knowledge about the device/environment they are running on,
1748+
the number and type of pointing devices available,
17451749
and a notion of which of these is generally and/or currently being used.
17461750
In situations where the primary input mechanism for a device is not a pointing device,
17471751
but there is a secondary – and less frequently used – input that is a pointing devices,
17481752
the user agent may decide to treat the non-pointing device as the primary (resulting in 'pointer: none').
1749-
user agents may also decide to dynamically change what type of pointing device is deemed to be primary,
1750-
in response to changes in the user environment
1753+
user agents may also decide to dynamically change what type of pointing device is deemed to be primary,
1754+
in response to changes in the user environment
17511755
or in the way the user is interacting with the UA.
17521756

17531757
Note: The 'pointer', 'hover', 'any-pointer' and 'any-hover' features only relate to the characteristics,
@@ -2283,7 +2287,7 @@ but for the sake of privacy and security,
22832287
UAs have been allowed to report inacurate information.
22842288

22852289
The <a href="http://www.w3.org/2001/tag/">TAG</a> has developed a <a href="https://www.w3.org/TR/security-privacy-questionnaire/">self-review questionaire</a>
2286-
to help editors and Working Groups evaluate the risks introduced by their specifications.
2290+
to help editors and Working Groups evaluate the risks introduced by their specifications.
22872291
Answers are provided below.
22882292

22892293

0 commit comments

Comments
 (0)