class

Opal::Style

Inherits Reference < Object

Fluent declarative styling engine inspired by Charm's Lipgloss.

Constructors

Instance methods

align(val : Symbol) : self
Source
align
Source
align=(align : Symbol)
Source
background(color : Color | Symbol | String) : self
Source
background
Source
background=(background : Color)
Source
bg(color : Color | Symbol | String) : self
Source
bold(val : Bool = true) : self
Source
bold=(bold : Bool)
Source
bold?
Source
border(style : Symbol | Border, fg : Color | Symbol | String = Color.none, bg : Color | Symbol | String = Color.none) : self
Source
border
Source
border=(border : Border)
Source
border_background
Source
border_background=(border_background : Color)
Source
border_foreground
Source
border_foreground=(border_foreground : Color)
Source
dim(val : Bool = true) : self
Source
faint(val : Bool = true) : self
Source
faint=(faint : Bool)
Source
faint?
Source
fg(color : Color | Symbol | String) : self

Fluent modifiers

Source
foreground(color : Color | Symbol | String) : self
Source
foreground
Source
foreground=(foreground : Color)
Source
height(val : Int32) : self
Source
height
Source
height=(height : Int32 | Nil)
Source
italic(val : Bool = true) : self
Source
italic=(italic : Bool)
Source
italic?
Source
margin(top : Int32, right : Int32, bottom : Int32, left : Int32) : self
Source
margin(vertical : Int32, horizontal : Int32) : self
Source
margin(all : Int32) : self
Source
margin_bottom
Source
margin_bottom=(margin_bottom : Int32)
Source
margin_left
Source
margin_left=(margin_left : Int32)
Source
margin_right
Source
margin_right=(margin_right : Int32)
Source
margin_top
Source
margin_top=(margin_top : Int32)
Source
padding(top : Int32, right : Int32, bottom : Int32, left : Int32) : self
Source
padding(vertical : Int32, horizontal : Int32) : self
Source
padding(all : Int32) : self
Source
padding_bottom
Source
padding_bottom=(padding_bottom : Int32)
Source
padding_left
Source
padding_left=(padding_left : Int32)
Source
padding_right
Source
padding_right=(padding_right : Int32)
Source
padding_top
Source
padding_top=(padding_top : Int32)
Source
render(content : String) : String

Renders text with all applied styling, padding, borders, and margins.

Source
reverse(val : Bool = true) : self
Source
reverse=(reverse : Bool)
Source
reverse?
Source
strikethrough(val : Bool = true) : self
Source
strikethrough=(strikethrough : Bool)
Source
strikethrough?
Source
underline(val : Bool = true) : self
Source
underline=(underline : Bool)
Source
underline?
Source
width(val : Int32) : self
Source
width
Source
width=(width : Int32 | Nil)
Source