@@ -1254,19 +1254,24 @@ <h2 id=media-queries><span class=secno>7. </span>Media Queries</h2>
1254
1254
default aspect ratio of the user agent.”
1255
1255
</ blockquote >
1256
1256
1257
- < p > For < code class =css > @viewport</ code > rules, though, it is recommended
1258
- that they are applied before media queries for other rules are evaluated.
1257
+ < p > For < code class =css > @viewport</ code > rules, though, the UA must cascade
1258
+ them separately with the < a href ="#initial-viewport "> initial viewport</ a >
1259
+ size used for evaluating media feature expressions and other values that
1260
+ depend on the viewport size to avoid circular dependencies, but use the
1261
+ actual viewport size when cascading all other properties and descriptors.
1259
1262
1260
- < p > Recommended procedure for applying CSS rules:
1263
+ < p > Procedure for applying CSS rules:
1261
1264
1262
1265
< ol >
1263
- < li > Apply < code class =css > @viewport</ code > rules. If < code
1264
- class = css > @ viewport</ code > rules rely on media queries, use the viewport
1265
- descriptors of the < a href =" #initial- viewport" > initial viewport </ a > .
1266
+ < li > Cascade all < code class =css > @viewport</ code > rules using the < a
1267
+ href =" #initial-viewport " > initial viewport</ a > size for values and
1268
+ evaluations which rely on viewport size
1266
1269
1267
- < li > Apply style rules. If style rules rely on media queries, use the
1268
- viewport descriptors obtained from step 1 when evaluating the media
1269
- queries.
1270
+ < li > Compute the < a href ="#actual-viewport "> actual viewport</ a > from the
1271
+ cascaded viewport descriptors
1272
+
1273
+ < li > Cascade all other properties and descriptors using the < a
1274
+ href ="#actual-viewport "> actual viewport</ a > size
1270
1275
</ ol >
1271
1276
1272
1277
< p class =note > The rationale for using the viewport descriptors obtained
0 commit comments