class Opal::Style

Overview

Fluent declarative styling engine inspired by Charm's Lipgloss.

Defined in:

opal/style/style.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def align(val : Symbol) : self #

[View source]
def align : Symbol #

[View source]
def align=(align : Symbol) #

[View source]
def background(color : Color | Symbol | String) : self #

[View source]
def background : Color #

[View source]
def background=(background : Color) #

[View source]
def bg(color : Color | Symbol | String) : self #

[View source]
def blink(val : Bool = true) : self #

[View source]
def blink=(blink : Bool) #

[View source]
def blink? : Bool #

[View source]
def bold(val : Bool = true) : self #

[View source]
def bold=(bold : Bool) #

[View source]
def bold? : Bool #

[View source]
def border(style : Symbol | Border, fg : Color | Symbol | String = Color.none, bg : Color | Symbol | String = Color.none) : self #

[View source]
def border : Border #

[View source]
def border=(border : Border) #

[View source]
def border_background : Color #

[View source]
def border_background=(border_background : Color) #

[View source]
def border_foreground : Color #

[View source]
def border_foreground=(border_foreground : Color) #

[View source]
def dim(val : Bool = true) : self #

[View source]
def faint(val : Bool = true) : self #

[View source]
def faint=(faint : Bool) #

[View source]
def faint? : Bool #

[View source]
def fg(color : Color | Symbol | String) : self #

Fluent modifiers


[View source]
def foreground(color : Color | Symbol | String) : self #

[View source]
def foreground : Color #

[View source]
def foreground=(foreground : Color) #

[View source]
def height(val : Int32) : self #

[View source]
def height : Int32 | Nil #

[View source]
def height=(height : Int32 | Nil) #

[View source]
def italic(val : Bool = true) : self #

[View source]
def italic=(italic : Bool) #

[View source]
def italic? : Bool #

[View source]
def margin(top : Int32, right : Int32, bottom : Int32, left : Int32) : self #

[View source]
def margin(vertical : Int32, horizontal : Int32) : self #

[View source]
def margin(all : Int32) : self #

[View source]
def margin_bottom : Int32 #

[View source]
def margin_bottom=(margin_bottom : Int32) #

[View source]
def margin_left : Int32 #

[View source]
def margin_left=(margin_left : Int32) #

[View source]
def margin_right : Int32 #

[View source]
def margin_right=(margin_right : Int32) #

[View source]
def margin_top : Int32 #

[View source]
def margin_top=(margin_top : Int32) #

[View source]
def padding(top : Int32, right : Int32, bottom : Int32, left : Int32) : self #

[View source]
def padding(vertical : Int32, horizontal : Int32) : self #

[View source]
def padding(all : Int32) : self #

[View source]
def padding_bottom : Int32 #

[View source]
def padding_bottom=(padding_bottom : Int32) #

[View source]
def padding_left : Int32 #

[View source]
def padding_left=(padding_left : Int32) #

[View source]
def padding_right : Int32 #

[View source]
def padding_right=(padding_right : Int32) #

[View source]
def padding_top : Int32 #

[View source]
def padding_top=(padding_top : Int32) #

[View source]
def render(content : String) : String #

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


[View source]
def reverse(val : Bool = true) : self #

[View source]
def reverse=(reverse : Bool) #

[View source]
def reverse? : Bool #

[View source]
def strikethrough(val : Bool = true) : self #

[View source]
def strikethrough=(strikethrough : Bool) #

[View source]
def strikethrough? : Bool #

[View source]
def underline(val : Bool = true) : self #

[View source]
def underline=(underline : Bool) #

[View source]
def underline? : Bool #

[View source]
def width(val : Int32) : self #

[View source]
def width : Int32 | Nil #

[View source]
def width=(width : Int32 | Nil) #

[View source]