From 40cbbc31b80b961902c4f61f62527431dddc0ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Mon, 9 Jan 2023 10:54:04 +0000 Subject: [PATCH] Add note about viewport size. [skip ci] --- docs/css_types/scalar.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/css_types/scalar.md b/docs/css_types/scalar.md index bf1640348..d8086a45d 100644 --- a/docs/css_types/scalar.md +++ b/docs/css_types/scalar.md @@ -77,12 +77,14 @@ So, if the container has a height of 100 cells, the width and the height of the ### Viewport width This is the same as the [width unit](#width), except that it is relative to the width of the viewport instead of the width of the immediate container. +The width of the viewport is the width of the terminal minus the widths of widgets that are docked left or right. For example, `width: 25vw` will try to set the width of a widget to be 25% of the viewport width, regardless of the widths of its containers. ### Viewport height This is the same as the [height unit](#height), except that it is relative to the height of the viewport instead of the height of the immediate container. +The height of the viewport is the height of the terminal minus the heights of widgets that are docked top or bottom. For example, `height: 75vh` will try to set the height of a widget to be 75% of the viewport height, regardless of the height of its containers.