class
Celestine::Style
- Celestine::Style
- Celestine::Drawable
- Reference
- Object
Overview
Embeds CSS stylesheets inside an SVG document
Defined in:
drawables/style.crConstant Summary
-
TAG =
"style"
Constructors
Instance Method Summary
-
#css(raw_css : String) : self
Adds a raw CSS string to this stylesheet
-
#draw(io : IO) : Nil
Main draw method for a drawable.
-
#rule(selector : String, **props) : self
Adds a formatted CSS rule with a selector and properties
- #rules : Array(String)
- #type : String
- #type=(type : String)
Instance methods inherited from class Celestine::Drawable
class_attribute(io : IO)
class_attribute,
classes : Array(String)
classes,
classes=(val : Array(String))
classes=,
custom_attribute(io : IO)
custom_attribute,
custom_attrs : Hash(String, String)
custom_attrs,
custom_attrs=(val : Hash(String, String))
custom_attrs=,
draw(io : IO) : Nil
draw,
has_inner_elements? : Bool
has_inner_elements?,
id : String | Nil
id,
id=(id : String | Nil)
id=,
id_attribute(io : IO)
id_attribute,
inner_elements : IO::Memory
inner_elements,
inner_elements=(val : IO::Memory)
inner_elements=,
style : Hash(String, String)
style,
style=(val : Hash(String, String))
style=,
style_attribute(io : IO)
style_attribute,
to_s(io : IO) : Nilto_s : String to_s
Constructor Detail
Instance Method Detail
def draw(io : IO) : Nil
#
Description copied from class Celestine::Drawable
Main draw method for a drawable. Takes in and interacts with an io.
def rule(selector : String, **props) : self
#
Adds a formatted CSS rule with a selector and properties
style.rule(".icon", fill: "#3b82f6", stroke_width: "2px")