Stylable
public protocol Stylable
A protocol that describes instances whose attributes that can be set vis a css style string. A default implementation is supplied that parses the style string and applies the attributes using the SVGelement
‘s supportedAttributes
.
-
styleAttributes
Extension methodThe curried function to be used for the
SVGElement
‘s default implementation. This dictionary is meant to be used in theSVGParserSupportedElements
instanceDeclaration
Swift
var styleAttributes: [String : (String) -> ()] { get }
Parameters
Key
The SVG string value of the attribute
Value
A curried function to use to implement the SVG attribute
-
styleAttributes
Extension methodThe curried function to be used for the
SVGElement
‘s default implementation. This dictionary is meant to be used in theSVGParserSupportedElements
instanceDeclaration
Swift
var styleAttributes: [String : (String) -> ()] { get }
Parameters
Key
The SVG string value of the attribute
Value
A curried function to use to implement the SVG attribute
-
style(_:)
Extension methodParses and applies the css-style
style
string to thisSVGElement
‘sSVGLayer
Declaration
Swift
func style(_ styleString: String)