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

> 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 device¡¯s 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'.


Hi,

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