Esc.Style (Esc v0.9.0)

View Source

A style definition for terminal output.

Styles are immutable structs that define how text should be rendered. Use the functions in Esc to build styles via pipelines.

Summary

Types

color()

@type color() :: atom() | integer() | {integer(), integer(), integer()} | String.t()

t()

@type t() :: %Esc.Style{
  align_horizontal: :left | :center | :right,
  align_vertical: :top | :middle | :bottom,
  background: color() | nil,
  blink: boolean(),
  bold: boolean(),
  border: atom() | Esc.Border.t() | nil,
  border_background: color() | nil,
  border_bottom: boolean(),
  border_foreground: color() | nil,
  border_left: boolean(),
  border_right: boolean(),
  border_top: boolean(),
  faint: boolean(),
  foreground: color() | nil,
  height: non_neg_integer() | nil,
  inline: boolean(),
  italic: boolean(),
  margin_bottom: non_neg_integer(),
  margin_left: non_neg_integer(),
  margin_right: non_neg_integer(),
  margin_top: non_neg_integer(),
  max_height: non_neg_integer() | nil,
  max_width: non_neg_integer() | nil,
  no_color: boolean(),
  padding_bottom: non_neg_integer(),
  padding_left: non_neg_integer(),
  padding_right: non_neg_integer(),
  padding_top: non_neg_integer(),
  renderer: (String.t(), t() -> String.t()) | nil,
  reverse: boolean(),
  strikethrough: boolean(),
  tab_width: non_neg_integer(),
  theme: Esc.Theme.t() | nil,
  underline: boolean(),
  width: non_neg_integer() | nil
}