Skip to content

Commit 460750b

Browse files
authored
[css-round-display-1] Update viewport-fit to property of viewport meta element. (#11757)
The @Viewport rule was removed in favor of using viewport meta properties. This updates viewport-fit to follow this change.
1 parent e9127f6 commit 460750b

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

css-round-display-1/Overview.bs

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -217,23 +217,15 @@ For example, when rendering to PDF, the shape is known to be a rectangle, so 'sh
217217
''true'' while ''shape: round'' to ''false''
218218
</p>
219219

220-
Extending the @viewport rule {#extending-viewport-rule}
220+
Extending the viewport <code class=html>&lt;meta&gt;</code> element {#extending-viewport-meta}
221221
==================================================
222222

223-
<h3 id="viewport-fit-descriptor">The 'viewport-fit' descriptor</h3>
223+
<h3 id="viewport-fit-property">The 'viewport-fit' property</h3>
224224

225-
'viewport-fit' can set the size of the visual viewport.
225+
The <dfn export><code>viewport-fit</code></dfn> property is recognized in the
226+
[[css-viewport#viewport-meta]].
227+
'viewport-fit' can set the size of the layout viewport.
226228

227-
<pre class=descdef>
228-
Name: viewport-fit
229-
For: @viewport
230-
Value: auto | contain | cover
231-
Initial: auto
232-
Percentages: N/A
233-
Computed value: as specified
234-
</pre>
235-
236-
The initial layout viewport seen through the physical screen of the device.
237229
On rounded screen, the part of the page that’s currently shown on-screen is round but
238230
the viewport is rectangular.
239231
Because of this, depending on the size of the viewport, some part of the page may be clipped.
@@ -245,7 +237,7 @@ Because of this, depending on the size of the viewport, some part of the page ma
245237
</figcaption>
246238
</figure>
247239

248-
'viewport-fit' can control the clipped area by setting the size of the visual viewport.
240+
'viewport-fit' can control the clipped area by setting the size of the layout viewport.
249241

250242
Values have the following meanings:
251243

@@ -293,10 +285,8 @@ If it have to be guaranteed that any part of the web page isn’t hidden, avoidi
293285

294286
When the 'viewport-fit' is specified with <a href="#valdef-viewport-fit-contain">contain</a>, the initial viewport is applied to the largest inscribed rectangle of the display.
295287

296-
<pre class="lang-css">
297-
@viewport (viewport-fit: contain) {
298-
/* CSS for the rectangular design */
299-
}
288+
<pre class="lang-html">
289+
&lt;meta name="viewport" content="viewport-fit=contain"&gt;
300290
</pre>
301291

302292
<figure>
@@ -308,16 +298,16 @@ If it have to be guaranteed that any part of the web page isn’t hidden, avoidi
308298

309299
When <a href="#valdef-viewport-fit-cover">cover</a> is given to the 'viewport-fit', the initial viewport is applied to the circumscribed rectangle of the display.
310300

311-
<pre class="lang-css">
312-
@viewport {
313-
viewport-fit: cover;
314-
}
315-
@media (shape: round){
316-
/* styles for the round design */
317-
}
318-
@media (shape: rect){
319-
/* styles for the rectangular design */
320-
}
301+
<pre class="lang-html">
302+
&lt;meta name="viewport" content="viewport-fit=cover"&gt;
303+
&lt;style&gt;
304+
@media (shape: round){
305+
/* styles for the round design */
306+
}
307+
@media (shape: rect){
308+
/* styles for the rectangular design */
309+
}
310+
&lt;/style&gt;
321311
</pre>
322312

323313
<figure>
@@ -479,6 +469,13 @@ Use Cases {#usecases}
479469
Changes {#changes}
480470
==================================================
481471

472+
<h3 id="changes_from_December_22_2016">
473+
Changes from <a href="http://www.w3.org/TR/2016/WD-css-round-display-1-20161222/">December 22<sup>th</sup> 2016</a> version</h3>
474+
475+
<ul>
476+
<li>Updated 'viewport-fit' to property of viewport <code class=html>&lt;meta&gt;</code> element.</li>
477+
</ul>
478+
482479
<h3 id="changes_from_March_01_2016">
483480
Changes from <a href="http://www.w3.org/TR/2016/WD-css-round-display-1-20160301/">March 1<sup>th</sup> 2016</a> version</h3>
484481

0 commit comments

Comments
 (0)