width: Width

View source: R/design-sizing.R

widthR Documentation

Width

Description

Utility function to change a tag element's width. Widths are specified relative the width of a parent element, an element's content, or the size of the browser window.

Usage

width(x, size)

Arguments

x

A tag element or .style pronoun.

size

A character string or number specifying the width of the tag element. Possible values:

One of 25, 50, 75, or 100 specifying the element's width is a percentage of its parent's width. The width of the parent element must be specified. Percentages do not account for margins or padding and may cause an element to extend beyond its parent element.

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

"viewport", in which case the element's width is determined by the size of the browser window.

See Also

Other design utilities: active(), affix(), background(), border(), display(), flex(), float(), font(), height(), margin(), padding(), scroll(), shadow()


nteetor/yonder documentation built on June 8, 2022, 1:36 p.m.