gap: Grid element spacing

Description Usage Arguments Details Examples

View source: R/gap.R

Description

The gap() function is used to space child elements of a parent tag element with display("grid"). Instead of specifying a margin for each child element a gap may be specified for the parent element. This function will have no effect on element's without display set to "grid".

Usage

1
gap(x, size)

Arguments

x

A tag element or .style pronoun.

size

A responsive argument.

One of 0, 1, 2, 3, 4, or 5 specifying the amount of gap space.

Details

Internet Explorer does not support the grid display layout.

Examples

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

div(
  .style %>%
    display("grid") %>%
    gap(2),
  div("Child 1"),
  div("Child 2"),
  div("Child 3")
)

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