css_position: Helper to set absolute position of an element.

View source: R/use_logo.R

css_positionR Documentation

Helper to set absolute position of an element.

Description

Sets position for an absolutely positioned element. Setting one of top or bottom or one of left or right will "unset" the other. It's probably not a good idea to set both top and bottom or right and left.

Usage

css_position(top = "1em", right = "1em", left = NULL, bottom = NULL)

Arguments

top, right, bottom, left

The position of the element in distance from the top, right, bottom, or left edge of it's container element.

Value

An object of class css_position that describes top, right, bottom, and left positions.

Examples

css_position(top = "1em", right = "1em") # top right corner
css_position(top = "1em", left = "1em") # top left corner
css_position(bottom = 0, right = 0) # bottom right corner

xaringanExtra documentation built on July 16, 2022, 5:06 p.m.