SVGStyleElementBuilder class

SVGStyleElementBuilder class

A builder class for constructing an SVG ‘style’ element. This class facilitates the creation and configuration of an SVG style element with CSS rules.

The SVGStyleElementBuilder type exposes the following members:

Constructors

ConstructorDescription
initConstructs a new instance of SVGStyleElementBuilder

Methods

MethodDescription
buildBuilds the SVG style element with the accumulated CSS rules and adds it to the specified document.
build
add_ruleAdds a CSS rule to the style element.
add_commentAdds a comment to the style content.
typeSets the ’type’ attribute of the SVG ‘style’ element.
This attribute specifies the style sheet language of the element’s contents.
mediaSets the ‘media’ attribute of the SVG ‘style’ element.
This attribute specifies the media for which the styles are intended, allowing the styles to be conditional on the media type.
titleSets the ’title’ attribute of the SVG ‘style’ element.
This attribute provides an advisory title for the style element, which can be useful for accessibility and tool-tip text.
build_elementBuilds and returns an SVGElement instance based on the current configuration of the builder.
attributeSets or updates an attribute on an SVG element.

See Also