height: Height

Description Usage Arguments Examples

View source: R/height.R

Description

The height() function adjusts a tag element's height. Heights are specified relative the height of a parent element, an element's content, or the size of the browser window.

Usage

1
height(x, size, min = NULL, max = NULL)

Arguments

x

A tag element or .style pronoun.

size

One of 25, 50, 75, 100, "auto", or "viewport" specifying the height of the tag element.

If 25, 50, 75, or 100, the element's height is a percentage of the height of the parent element must also be specified.

These percentages do not account for margins or padding and may cause an element to extend beyond its parent element.

If "auto", the element's height is determined by the browser. The browser will take into account the height, padding, margins, and border of the tag element's parent to keep the element from extending beyond its parent.

If "viewport", the element's height is determined by the size of the browser window.

min

One of 25, 50, 75, 100, or "viewport" specifying the minimum height of the tag element.

See size for details.

max

One of 25, 50, 75, 100, or "viewport" specifying the maximum height of the tag element.

See size for details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(htmltools)

div(
  .style %>%
     height("auto", max = "viewport") %>%
     overflow("auto"),
  "Vivamus id enim.",
  "Nunc rutrum turpis sed pede.",
  "Nunc aliquet, augue nec adipiscing interdum, ",
  "lacus tellus malesuada massa, quis varius mi purus non odio."
)

cascadess documentation built on Jan. 13, 2021, 5:10 p.m.