class

Obelisk::Style

Inherits Reference < Object

Complete style/theme definition

Constructors

build(name : String, background : Color = Color::WHITE, &block : StyleBuilder -> Nil) : Style

Builder method for creating styles

Source
new(name : String, background : Color = Color::WHITE, entries : Hash(Obelisk::TokenType, Obelisk::StyleEntry) = {} of TokenType => StyleEntry)
Source

Instance methods

background
Source
entries
Source
get(token_type : TokenType) : StyleEntry

Get style entry for a token type with inheritance

Source
get_direct(token_type : TokenType) : StyleEntry | Nil

Get direct style entry for a token type (without inheritance)

Source
name
Source
set(token_type : TokenType, entry : StyleEntry) : Nil

Set style for a token type

Source
with(token_type : TokenType, entry : StyleEntry) : Style

Create a new style with the given entry added

Source