mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-09-20 07:21:22 +00:00
Style interface
This commit is contained in:
parent
2c6c65b827
commit
f3cdb47a96
29
src/styles.cr
Normal file
29
src/styles.cr
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
module Tartrazine
|
||||||
|
class Style
|
||||||
|
# These properties are tri-state.
|
||||||
|
# true means it's set
|
||||||
|
# false means it's not set
|
||||||
|
# nil means inherit from parent style
|
||||||
|
property bold : Bool?
|
||||||
|
property nobold : Bool?
|
||||||
|
property italic : Bool?
|
||||||
|
property notalic : Bool?
|
||||||
|
property underline : Bool?
|
||||||
|
|
||||||
|
# These properties are either set or nil
|
||||||
|
# (inherit from parent style)
|
||||||
|
property background : String?
|
||||||
|
property border : String?
|
||||||
|
property color : String?
|
||||||
|
end
|
||||||
|
|
||||||
|
class Theme
|
||||||
|
property name : String = ""
|
||||||
|
|
||||||
|
styles = Hash{String => Style}
|
||||||
|
|
||||||
|
# Get the style for a token.
|
||||||
|
def style(token)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user