From 6b28c823a762acdbe131c9f16f49f331135d9bec Mon Sep 17 00:00:00 2001
From: Robert Flack
Date: Thu, 20 Feb 2025 13:16:59 -0500
Subject: [PATCH] [css-round-display-1] Update viewport-fit to property of
viewport meta element.
The @viewport rule was removed in favor of using viewport meta properties.
This updates viewport-fit to follow this change.
---
css-round-display-1/Overview.bs | 53 ++++++++++++++++-----------------
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/css-round-display-1/Overview.bs b/css-round-display-1/Overview.bs
index b69c5f14aeae..7785341372f9 100755
--- a/css-round-display-1/Overview.bs
+++ b/css-round-display-1/Overview.bs
@@ -217,23 +217,15 @@ For example, when rendering to PDF, the shape is known to be a rectangle, so 'sh
''true'' while ''shape: round'' to ''false''
-Extending the @viewport rule {#extending-viewport-rule}
+Extending the viewport <meta> element {#extending-viewport-meta}
==================================================
-
The 'viewport-fit' descriptor
+
The 'viewport-fit' property
-'viewport-fit' can set the size of the visual viewport.
+The viewport-fit property is recognized in the
+[[css-viewport#viewport-meta]].
+'viewport-fit' can set the size of the layout viewport.
-
- Name: viewport-fit
- For: @viewport
- Value: auto | contain | cover
- Initial: auto
- Percentages: N/A
- Computed value: as specified
-
-
-The initial layout viewport seen through the physical screen of the device.
On rounded screen, the part of the page that’s currently shown on-screen is round but
the viewport is rectangular.
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
-'viewport-fit' can control the clipped area by setting the size of the visual viewport.
+'viewport-fit' can control the clipped area by setting the size of the layout viewport.
Values have the following meanings:
@@ -293,10 +285,8 @@ If it have to be guaranteed that any part of the web page isn’t hidden, avoidi
When the 'viewport-fit' is specified with contain, the initial viewport is applied to the largest inscribed rectangle of the display.
-
- @viewport (viewport-fit: contain) {
- /* CSS for the rectangular design */
- }
+
@@ -308,16 +298,16 @@ If it have to be guaranteed that any part of the web page isn’t hidden, avoidi
When cover is given to the 'viewport-fit', the initial viewport is applied to the circumscribed rectangle of the display.
-
- @viewport {
- viewport-fit: cover;
- }
- @media (shape: round){
- /* styles for the round design */
- }
- @media (shape: rect){
- /* styles for the rectangular design */
- }
+
+ <meta name="viewport" content="viewport-fit=cover">
+ <style>
+ @media (shape: round){
+ /* styles for the round design */
+ }
+ @media (shape: rect){
+ /* styles for the rectangular design */
+ }
+ </style>