SvgSymbolOptionsAttributesToPreserve Property

Gets or sets the attributes to preserve when converting <svg> tag to <symbol> tag or vice versa.

Wildcards can be used: * - Zero or more characters, ? - Exactly one character.

Default value is { "id", "viewBox", "class", "style", "fill", "stroke", "opacity", "transform" }.

Attributes that should be usually preserved on <symbol> tag:

  • viewBox — must be preserved on <symbol> to define coordinate system
  • id — required for referencing the symbol later
  • fill, stroke, opacity, transform — if used for styling
  • class, style — if CSS is applied
  • width and height — optional; usually omitted in sprites

Definition

Namespace: DotMake.SvgSprite
Assembly: DotMake.SvgSprite (in DotMake.SvgSprite.dll) Version: 1.0.0
C#
public string[] AttributesToPreserve { get; set; }

Property Value

String

See Also