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.

public class SVGStyleElementBuilder : SVGElementBuilder<SVGStyleElement>, ICoreAttributeSetter, 
    IDocumentElementEventAttributeSetter, IGlobalEventAttributeSetter

Constructors

NameDescription
SVGStyleElementBuilder()The default constructor.

Properties

NameDescription
Configurations { get; }

Methods

NameDescription
AddComment(string)Adds a comment to the style content.
AddRule(string, Action<RuleBuilder>)Adds a CSS rule to the style element using a RuleBuilder.
AddRule(string, string)Adds a CSS rule to the style element.
Attribute(string, string)
override Build(Document)Builds the SVG style element with the accumulated CSS rules and adds it to the specified document.
virtual Build(SVGStyleElement)
BuildElement(Document)
Media(string)Sets 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.
Title(string)Sets 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.
Type(string)Sets the ’type’ attribute of the SVG ‘style’ element. This attribute specifies the style sheet language of the element’s contents.

See Also