W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-round-display] Method for setting the viewport into the non-rectangle display

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 13 Apr 2016 10:04:14 +0900
Cc: www-style list <www-style@w3.org>
Message-Id: <101EA01B-56CC-4F9D-99D3-3CAB34E6D3AD@rivoal.net>
To: "ȫ/ӿ/SW Platform()WMT(jh.hong@lge.com)" <jh.hong@lge.com>

> On Apr 5, 2016, at 20:13, ȫ/ӿ/SW Platform()WMT(jh.hong@lge.com) <jh.hong@lge.com> wrote:
> Hi,
> I think there would be a way to set the viewport size as the inscribed square of the non-rectangle display.
> It could be a solution for the action item.
> https://www.w3.org/Style/CSS/Tracker/actions/751
> We discussed about the robustness of CSS on non-rectangular devices at the F2F in Sydney.
> When the web page is displayed on the rounded display, the viewport takes the shape of circumscribed square of the display.
> Therefore the corners of the web page get clipped.
> But any content of the web page shouldn't be lost no matter what the shape of display is.
> So I think about adding 'contain' value to <viewport-length> for viewport descriptors.[1]
> The author can give the viewport to optimal size for the shape of display by setting 'width' or 'height' to 'contain'.
> Then the UA automatically chooses the size of the initial viewport as the inscribe rectangle of the devices shape.
> Or this value can be separated with a new descriptor for @viewport such as:
> 	viewport-fit: contain
> This descriptor decides both width and height of the viewport, so it cant't be used with 'width' or 'height'.


I think a separate descriptor works best. Starting from your proposal above:

  viewport-fit: auto | contain | cover
  initial value: auto

  This descriptor only has an effect when the screen/window/viewing area
  is not rectangular. When it is rectangular, both values give the same result.
  On non-rectangular screens/windows/viewing areas, it determines what
  rectangle is used to set the dimensions of Initial Viewport, and is
  used as the Visual Viewport.
  contain: The largest rectangle strictly inscribed in the
           screen / window / viewing area is used.

  cover: The bounding box of screen / window / viewing area is used.

  auto: Same as 'contain', except the UA may also use a slightly larger
        rectangle, as long as this would not cause a significant part of
        the viewport to be off screen. In any case, the rectangle must not
        be larger than the one implied by contain. For example, on
        a screen with only slightly rounded corners, the rectangle used
        could be the same as with 'cover'

Or maybe we could merge auto and contain into a single value if we don't care about providing a way to pick between strictly contain and approximately contain.

 - Florian
Received on Wednesday, 13 April 2016 01:04:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC