width_relative: Relative width

View source: R/width-relative.R

width_relativeR Documentation

Relative width

Description

The width_relative() function adjusts a tag element's width relative to its parent element's width.

Usage

width_relative(x, percent)

Arguments

x

A tag element or .style pronoun.

percent

A number specifying a percent. One of,

  • 25

  • 50

  • 75

  • 100

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    width_relative(25)
)

div(
  .style %>%
    width_relative(100)
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.