glink/style

Types

pub type Style

Values

pub fn align_items(align_items: AlignItems) -> Style

The align-items property defines the default behavior for how items are laid out along the cross axis (perpendicular to the main axis). See align-items.

pub fn align_self(align_self: AlignSelf) -> Style

It makes possible to override the align-items value for specific flex items. See align-self.

pub fn border_bottom(border_bottom: Bool) -> Style

Determines whether bottom border is visible. Defaults to True.

pub fn border_bottom_() -> Style

Hide the bottom border.

pub fn border_bottom_color(border_bottom_color: Color) -> Style

Change bottom border color. Accepts the same values as color in text component.

pub fn border_bottom_color_(border_bottom_color: String) -> Style

Change bottom border color. Accepts the same values as color in text component.

pub fn border_bottom_dim_color(
  border_bottom_dim_color: Bool,
) -> Style

Dim the bottom border color.

pub fn border_bottom_dim_color_() -> Style

Dim the bottom border color.

pub fn border_color(border_color: Color) -> Style

Change border color. Shorthand for setting border_top_color, border_right_color, border_bottom_color and border_left_color.

pub fn border_color_(border_color: String) -> Style

Change border color. Shorthand for setting border_top_color, border_right_color, border_bottom_color and border_left_color.

pub fn border_dim_color(border_dim_color: Bool) -> Style

Dim the border color. Shorthand for setting border_top_dim_color, border_bottom_dim_color, border_left_dim_color and border_right_dim_color.

pub fn border_dim_color_() -> Style

Dim the border color. Shorthand for setting border_top_dim_color, border_bottom_dim_color, border_left_dim_color and border_right_dim_color.

pub fn border_left(border_left: Bool) -> Style

Determines whether left border is visible. Defaults to True.

pub fn border_left_() -> Style

Hide the left border.

pub fn border_left_color(border_left_color: Color) -> Style

Change left border color. Accepts the same values as color in text component.

pub fn border_left_color_(border_left_color: String) -> Style

Change left border color. Accepts the same values as color in text component.

pub fn border_left_dim_color(
  border_left_dim_color: Bool,
) -> Style

Dim the left border color.

pub fn border_left_dim_color_() -> Style

Dim the left border color.

pub fn border_right(border_right: Bool) -> Style

Determines whether right border is visible. Defaults to True.

pub fn border_right_() -> Style

Hide the right border.

pub fn border_right_color(border_right_color: Color) -> Style

Change right border color. Accepts the same values as color in text component.

pub fn border_right_color_(border_right_color: String) -> Style

Change right border color. Accepts the same values as color in text component.

pub fn border_right_dim_color(
  border_right_dim_color: Bool,
) -> Style

Dim the right border color.

pub fn border_right_dim_color_() -> Style

Dim the right border color.

pub fn border_style(
  top_left top_left: String,
  top top: String,
  top_right top_right: String,
  right right: String,
  bottom_right bottom_right: String,
  bottom bottom: String,
  bottom_left bottom_left: String,
  left left: String,
) -> Style

Add a border with a specified style. If border_style is not specified, no border will be added.

pub fn border_style_(border_style: BorderStyle) -> Style

Add a border with a specified style. If border_style is not specified, no border will be added.

pub fn border_top(border_top: Bool) -> Style

Determines whether top border is visible. Defaults to True.

pub fn border_top_() -> Style

Hide the top border.

pub fn border_top_color(border_top_color: Color) -> Style

Change top border color. Accepts the same values as color in text component.

pub fn border_top_color_(border_top_color: String) -> Style

Change top border color. Accepts the same values as color in text component.

pub fn border_top_dim_color(border_top_dim_color: Bool) -> Style

Dim the top border color.

pub fn border_top_dim_color_() -> Style

Dim the top border color.

pub fn column_gap(column_gap: Float) -> Style

Size of the gap between an element’s columns.

pub fn display(display: Display) -> Style

Set this property to None to hide the element.

pub fn display_() -> Style

Hide the element.

pub fn flex_basis(flex_basis: String) -> Style

It specifies the initial size of the flex item, before any available space is distributed according to the flex factors. See flex-basis.

pub fn flex_direction(flex_direction: FlexDirection) -> Style

It establishes the main-axis, thus defining the direction flex items are placed in the flex container. See flex-direction.

pub fn flex_grow(flex_grow: Float) -> Style

This property defines the ability for a flex item to grow if necessary. See flex-grow.

pub fn flex_shrink(flex_shrink: Float) -> Style

It specifies the “flex shrink factor”, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the row. See flex-shrink.

pub fn flex_wrap(flex_wrap: FlexWrap) -> Style

It defines whether the flex items are forced in a single line or can be flowed into multiple lines. If set to multiple lines, it also defines the cross-axis which determines the direction new lines are stacked in. See flex-wrap.

pub fn gap(gap: Float) -> Style

Size of the gap between an element’s columns and rows. Shorthand for column_gap and row_gap.

pub fn height(height: String) -> Style

Height of the element in lines (rows). You can also set it in percent, which will calculate the height based on the height of parent element.

pub fn justify_content(justify_content: JustifyContent) -> Style

It defines the alignment along the main axis. See justify-content.

pub fn margin(margin: Float) -> Style

Margin on all sides. Equivalent to setting margin_top, margin_bottom, margin_left and margin_right.

pub fn margin_bottom(margin_bottom: Float) -> Style

Bottom margin.

pub fn margin_left(margin_left: Float) -> Style

Left margin.

pub fn margin_right(margin_right: Float) -> Style

Right margin.

pub fn margin_top(margin_top: Float) -> Style

Top margin.

pub fn margin_x(margin_x: Float) -> Style

Horizontal margin. Equivalent to setting margin_left and margin_right.

pub fn margin_y(margin_y: Float) -> Style

Vertical margin. Equivalent to setting margin_top and margin_bottom.

pub fn min_height(min_height: String) -> Style

Sets a minimum height of the element.

pub fn min_width(min_width: String) -> Style

Sets a minimum width of the element.

pub fn overflow(overflow: Overflow) -> Style

Behavior for an element’s overflow in both directions. Defaults to Visible.

pub fn overflow_() -> Style

Hides an element’s overflow in both directions.

pub fn overflow_x(overflow_x: Overflow) -> Style

Behavior for an element’s overflow in horizontal direction. Defaults to Visible.

pub fn overflow_x_() -> Style

Hides an element’s overflow in horizontal direction.

pub fn overflow_y(overflow_y: Overflow) -> Style

Behavior for an element’s overflow in vertical direction. Defaults to Visible.

pub fn overflow_y_() -> Style

Hides an element’s overflow in vertical direction.

pub fn padding(padding: Float) -> Style

Padding on all sides. Equivalent to setting padding_top, padding_bottom, padding_left and padding_right.

pub fn padding_bottom(padding_bottom: Float) -> Style

Bottom padding.

pub fn padding_left(padding_left: Float) -> Style

Left padding.

pub fn padding_right(padding_right: Float) -> Style

Right padding.

pub fn padding_top(padding_top: Float) -> Style

Top padding.

pub fn padding_x(padding_x: Float) -> Style

Horizontal padding. Equivalent to setting padding_left and padding_right.

pub fn padding_y(padding_y: Float) -> Style

Vertical padding. Equivalent to setting padding_top and padding_bottom.

pub fn position(position: Position) -> Style
pub fn row_gap(row_gap: Float) -> Style

Size of the gap between element’s rows.

pub fn text_wrap(text_wrap: TextWrap) -> Style
pub fn width(width: String) -> Style

Width of the element in spaces. You can also set it in percent, which will calculate the width based on the width of parent element.

Search Document