bindFillRole | R Documentation |
Create fill containers and items. If a fill item is a direct child of a fill container, and that container has an opinionated height, then the item is allowed to grow and shrink to its container's size.
bindFillRole(
x,
...,
item = FALSE,
container = FALSE,
overwrite = FALSE,
.cssSelector = NULL
)
x |
a |
... |
currently unused. |
item |
whether or not to treat |
container |
whether or not to treat |
overwrite |
whether or not to override previous calls to
|
.cssSelector |
A character string containing a CSS selector for
targeting particular (inner) tag(s) of interest. For more details on what
selector(s) are supported, see |
The original tag object (x
) with additional attributes (and a
htmlDependency()
).
tagz <- div(
id = "outer",
style = css(
height = "600px",
border = "3px red solid"
),
div(
id = "inner",
style = css(
height = "400px",
border = "3px blue solid"
)
)
)
# Inner doesn't fill outer
if (interactive()) browsable(tagz)
tagz <- bindFillRole(tagz, container = TRUE)
tagz <- bindFillRole(tagz, item = TRUE, .cssSelector = "#inner")
# Inner does fill outer
if (interactive()) browsable(tagz)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.