Attribute groups¶
Groups of attributes that are commonly used together.
AnimationAdditionAttrs ¶
Bases: AccumulateAttr, AdditiveAttr
The animation addition attributes.
From the SVG 1.1 specification:
"[...] are common to elements
animate,animateColor,animateMotionandanimateTransform."
Parameters:
-
additive(Literal[replace, sum] | None, default:None) – -
accumulate(Literal[none] | Literal[sum] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
AnimationAttributeTargetAttrs ¶
Bases: AttributeNameAttr, AttributeTypeAttr
The animation attribute target attributes.
From the SVG 1.1 specification:
"[...] identify the target attribute or property for the given target element whose value changes over time."
Parameters:
-
attributeType(Literal[CSS, XML] | Literal[auto] | None, default:None) – -
attributeName(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
AnimationEventsAttrs ¶
Bases: OnBeginAttr, OnEndAttr, OnLoadAttr, OnRepeatAttr
The animation event attributes.
From the SVG 1.1 specification:
"An animation event attribute is an event attribute that specifies script to run for a particular animation-related event."
Parameters:
-
onrepeat(str | None, default:None) – -
onload(str | None, default:None) – -
onend(str | None, default:None) – -
onbegin(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
AnimationTimingAttrs ¶
Bases: BeginAttr, DurAttr, EndAttr, FillAttr, MaxAttr, MinAttr, RepeatCountAttr, RepeatDurAttr, RestartAttr
The animation timing attributes.
From the SVG 1.1 specification:
"They are common to all animation elements and control the timing of the animation, including what causes the animation to start and end, whether the animation runs repeatedly, and whether to retain the end state the animation once the animation ends."
Parameters:
-
restart(Literal[always, whenNotActive, never] | None, default:None) – -
repeatDur(Literal[indefinite] | str | None, default:None) – -
repeatCount(Literal[indefinite] | Annotated[float, AllowInfNan] | None, default:None) – -
min(Literal[media] | str | None, default:None) – -
max(Literal[media] | str | None, default:None) – -
fill(Literal[none] | Literal[currentColor, context - fill, context - stroke] | Literal[inherit] | Color | Annotated[FuncIri, BeforeValidator] | Literal[freeze, remove] | None, default:None) – -
end(Annotated[list[str], BeforeValidator, AfterValidator] | None, default:None) – -
dur(str | Literal[media, indefinite] | None, default:None) – -
begin(Annotated[list[str], BeforeValidator, AfterValidator] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
AnimationValueAttrs ¶
Bases: ByAttr, CalcModeAttr, FromAttr, KeySplinesAttr, KeyTimesAttr, ToAttr, ValuesListAttr
The animation value attributes.
From the SVG 1.1 specification:
"They are common to elements
animate,animateColor,animateMotionandanimateTransform. These attributes define the values that are assigned to the target attribute or property over time. The attributes [...] provide control over the relative timing of keyframes and the interpolation method between discrete values."
Parameters:
-
values(Annotated[list[str], BeforeValidator, AfterValidator] | None, default:None) – -
to(str | None, default:None) – -
keyTimes(Annotated[list[Annotated[float, AllowInfNan]], BeforeValidator, AfterValidator] | None, default:None) – -
keySplines(Annotated[list[Annotated[tuple[Annotated[float, AllowInfNan], Annotated[float, AllowInfNan], Annotated[float, AllowInfNan], Annotated[float, AllowInfNan]], BeforeValidator]], BeforeValidator, AfterValidator] | None, default:None) – -
from_(str | None, default:None) – -
calcMode(Literal[discrete, linear, paced, spline] | None, default:None) – -
by(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
ConditionalProcessingAttrs ¶
Bases: RequiredFeaturesAttr, RequiredExtensionsAttr, SystemLanguageAttr
The conditional processing attributes.
From the SVG 1.1 specification:
"A conditional processing attribute is one that controls whether or not the element on which it appears is processed. Most elements, but not all, may have conditional processing attributes specified on them."
Parameters:
-
systemLanguage(str | None, default:None) – -
requiredExtensions(Annotated[list[Annotated[Iri, BeforeValidator]], BeforeValidator] | None, default:None) – -
requiredFeatures(Annotated[list[str], BeforeValidator] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
CoreAttrs ¶
Bases: IdAttr, LangAttr, XmlBaseAttr, XmlLangAttr, XmlSpaceAttr
The core attributes.
From the SVG 1.1 specification:
"The core attributes are those attributes that can be specified on any SVG element."
Parameters:
-
xml_space(Literal[default, preserve] | None, default:None) – -
xml_lang(str | None, default:None) – -
xml_base(Annotated[Iri, BeforeValidator] | None, default:None) – -
lang(str | None, default:None) – -
id(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
DocumentEventsAttrs ¶
Bases: OnAbortAttr, OnErrorAttr, OnResizeAttr, OnScrollAttr, OnUnloadAttr, OnZoomAttr
The document event attributes.
From the SVG 1.1 specification:
"A document event attribute is an event attribute that specifies script to run for a particular document-wide event."
Parameters:
-
onzoom(str | None, default:None) – -
onunload(str | None, default:None) – -
onscroll(str | None, default:None) – -
onresize(str | None, default:None) – -
onerror(str | None, default:None) – -
onabort(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
EventAttrs ¶
Bases: GraphicalEventsAttrs, AnimationEventsAttrs, DocumentEventsAttrs
All event attributes.
Parameters:
-
onzoom(str | None, default:None) – -
onunload(str | None, default:None) – -
onscroll(str | None, default:None) – -
onresize(str | None, default:None) – -
onerror(str | None, default:None) – -
onabort(str | None, default:None) – -
onrepeat(str | None, default:None) – -
onmouseup(str | None, default:None) – -
onmouseover(str | None, default:None) – -
onmouseout(str | None, default:None) – -
onmousemove(str | None, default:None) – -
onmousedown(str | None, default:None) – -
onload(str | None, default:None) – -
onend(str | None, default:None) – -
onbegin(str | None, default:None) – -
onfocusout(str | None, default:None) – -
onfocusin(str | None, default:None) – -
onclick(str | None, default:None) – -
onactivate(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
FilterPrimitivesAttrs ¶
Bases: XCoordinateAttr, YCoordinateAttr, WidthAttr, HeightAttr, ResultAttr
The filter primitive attributes.
From the SVG 1.1 specification:
"The filter primitive attributes is the set of attributes that are common to all filter primitive elements."
Parameters:
-
result(str | None, default:None) – -
height(Annotated[Length, BeforeValidator] | None, default:None) – -
width(Annotated[Length, BeforeValidator] | None, default:None) – -
y(Annotated[Length, BeforeValidator] | None, default:None) – -
x(Annotated[Length, BeforeValidator] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
GraphicalEventsAttrs ¶
Bases: OnActivateAttr, OnClickAttr, OnFocusInAttr, OnFocusOutAttr, OnLoadAttr, OnMouseDownAttr, OnMouseMoveAttr, OnMouseOutAttr, OnMouseOverAttr, OnMouseUpAttr
The graphical event attributes.
From the SVG 1.1 specification:
"A graphical event attribute is an event attribute that specifies script to run for a particular user interaction event."
Parameters:
-
onmouseup(str | None, default:None) – -
onmouseover(str | None, default:None) – -
onmouseout(str | None, default:None) – -
onmousemove(str | None, default:None) – -
onmousedown(str | None, default:None) – -
onload(str | None, default:None) – -
onfocusout(str | None, default:None) – -
onfocusin(str | None, default:None) – -
onclick(str | None, default:None) – -
onactivate(str | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
PresentationAttrs ¶
Bases: AlignmentBaselineAttr, BaselineShiftAttr, ClipAttr, ClipPathAttr, ClipRuleAttr, ColorAttr, ColorInterpolationAttr, ColorInterpolationFiltersAttr, ColorProfileAttr, ColorRenderingAttr, CursorAttr, DirectionAttr, DisplayAttr, DominantBaselineAttr, EnableBackgroundAttr, FillAttr, FillOpacityAttr, FillRuleAttr, FilterAttr, FloodColorAttr, FloodOpacityAttr, FontFamilyAttr, FontSizeAdjustAttr, FontSizeAttr, FontStretchAttr, FontStyleAttr, FontVariantAttr, FontWeightAttr, GlyphOrientationHorizontalAttr, GlyphOrientationVerticalAttr, ImageRenderingAttr, KerningAttr, LetterSpacingAttr, LightingColorAttr, MarkerEndAttr, MarkerMidAttr, MarkerStartAttr, MaskAttr, OpacityAttr, OverflowAttr, PaintOrderAttr, PointerEventsAttr, ShapeRenderingAttr, StopColorAttr, StopOpacityAttr, StrokeAttr, StrokeDasharrayAttr, StrokeDashoffsetAttr, StrokeLinecapAttr, StrokeLinejoinAttr, StrokeMiterlimitAttr, StrokeOpacityAttr, StrokeWidthAttr, TextAlignAllAttr, TextAlignAttr, TextAlignLastAttr, TextAnchorAttr, TextDecorationAttr, TextIndentAttr, TextRenderingAttr, TransformAttr, TransformOriginAttr, UnicodeBidiAttr, VectorEffectAttr, VisibilityAttr, WhiteSpaceAttr, WordSpacingAttr, WritingModeAttr
The presentation attributes.
From the SVG 1.1 specification:
"An XML attribute on an SVG element which specifies a value for a given property for that element."
Parameters:
-
writing_mode(Literal[lr - tb, rl - tb, tb - rl, lr, rl, tb] | Literal[inherit] | None, default:None) – -
word_spacing(Literal[normal] | Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
white_space(Literal[normal, pre, nowrap, pre - wrap, 'break-spaces', pre - line] | Literal[inherit] | None, default:None) – -
visibility(Literal[visible, hidden, collapse] | Literal[inherit] | None, default:None) – -
vector_effect(Literal[non - scaling - stroke, non - scaling - size, non - rotation, fixed - position] | Literal[none] | None, default:None) – -
unicode_bidi(Literal[normal, embed, bidi - override] | Literal[inherit] | None, default:None) – -
transform_origin(Literal[left, center, right, top, bottom] | Annotated[Length, BeforeValidator] | Annotated[tuple[Literal[left, center, right, top, bottom] | Annotated[Length, BeforeValidator], Literal[left, center, right, top, bottom] | Annotated[Length, BeforeValidator]], BeforeValidator] | Annotated[tuple[Literal[left, center, right, top, bottom] | Annotated[Length, BeforeValidator], Literal[left, center, right, top, bottom] | Annotated[Length, BeforeValidator], Annotated[Length, BeforeValidator]], BeforeValidator] | None, default:None) – -
transform(Annotated[list[Translate | Scale | Rotate | SkewX | SkewY | Matrix], BeforeValidator] | None, default:None) – -
text_rendering(Literal[auto] | Literal[optimizeSpeed, optimizeLegibility, geometricPrecision] | Literal[inherit] | None, default:None) – -
text_indent(Annotated[Length, BeforeValidator] | Literal[each - line, hanging] | Literal[inherit] | None, default:None) – -
text_decoration(Literal[none] | Annotated[list[Literal[underline, overline, line - through, blink]], BeforeValidator] | Literal[inherit] | None, default:None) – -
text_anchor(Literal[start, middle, end] | Literal[inherit] | None, default:None) – -
text_align_last(Literal[auto] | Literal[start, end, left, right, center, justify, match - parent] | Literal[inherit] | None, default:None) – -
text_align(Literal[start, end, left, right, center, justify, match - parent, justify - all] | Literal[inherit] | None, default:None) – -
text_align_all(Literal[start, end, left, right, center, justify, match - parent] | Literal[inherit] | None, default:None) – -
stroke_width(Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
stroke_opacity(Annotated[float, AllowInfNan, AfterValidator] | Literal[inherit] | None, default:None) – -
stroke_miterlimit(Annotated[float, AllowInfNan, FieldInfo] | Literal[inherit] | None, default:None) – -
stroke_linejoin(Literal[miter, round, bevel, miter - clip, arcs] | Literal[inherit] | None, default:None) – -
stroke_linecap(Literal[butt, round, square] | Literal[inherit] | None, default:None) – -
stroke_dashoffset(Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
stroke_dasharray(Literal[none] | Annotated[list[Annotated[Length, BeforeValidator]], BeforeValidator] | Literal[inherit] | None, default:None) – -
stroke(Literal[none] | Literal[currentColor, context - fill, context - stroke] | Literal[inherit] | Color | Annotated[FuncIri, BeforeValidator] | None, default:None) – -
stop_opacity(Annotated[float, AllowInfNan, AfterValidator] | Literal[inherit] | None, default:None) – -
stop_color(Literal[currentColor] | Literal[inherit] | Color | str | None, default:None) – -
shape_rendering(Literal[auto] | Literal[optimizeSpeed, crispEdges, geometricPrecision] | Literal[inherit] | None, default:None) – -
pointer_events(Literal[visiblePainted, visibleFill, visibleStroke, visible, painted, fill, stroke] | Literal[all] | Literal[none] | Literal[inherit] | None, default:None) – -
paint_order(Literal[normal, fill, stroke, markers] | None | Literal[inherit], default:None) – -
overflow(Literal[visible, hidden, scroll] | Literal[auto] | Literal[inherit] | None, default:None) – -
opacity(Annotated[float, AllowInfNan, AfterValidator] | Literal[inherit] | None, default:None) – -
mask(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
marker_start(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
marker_mid(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
marker_end(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
lighting_color(Literal[currentColor] | Color | Literal[inherit] | str | None, default:None) – -
letter_spacing(Literal[normal] | Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
kerning(Literal[auto] | Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
image_rendering(Literal[auto] | Literal[optimizeSpeed, optimizeQuality] | Literal[inherit] | None, default:None) – -
glyph_orientation_vertical(Literal[auto] | Annotated[Angle, BeforeValidator] | Literal[inherit] | None, default:None) – -
glyph_orientation_horizontal(Annotated[Angle, BeforeValidator] | Literal[inherit] | None, default:None) – -
font_weight(Literal[all] | Literal[inherit] | Annotated[list[Literal[normal, bold, bolder, lighter] | Annotated[Literal[100, 200, 300, 400, 500, 600, 700, 800, 900], BeforeValidator]], BeforeValidator] | None, default:None) – -
font_variant(Literal[normal, small - caps] | Literal[inherit] | None, default:None) – -
font_style(Literal[all] | Annotated[list[Literal[normal, italic, oblique]], BeforeValidator] | Literal[inherit] | None, default:None) – -
font_stretch(Literal[all] | Literal[condensed, expanded, extra - condensed, extra - expanded, narrower, normal, semi - condensed, semi - expanded, ultra - condensed, ultra - expanded, wider] | Literal[inherit] | None, default:None) – -
font_size(Literal[xx - small, x - small, small, medium, large, x - large, xx - large] | Literal[smaller, larger] | Annotated[Length, BeforeValidator] | Literal[inherit] | Literal[all] | Annotated[list[Annotated[Length, BeforeValidator]], BeforeValidator] | None, default:None) – -
font_size_adjust(Annotated[float, AllowInfNan] | Literal[none] | Literal[inherit] | None, default:None) – -
font_family(Annotated[list[str], BeforeValidator] | Literal[inherit] | None, default:None) – -
flood_opacity(Annotated[float, AllowInfNan, AfterValidator] | Literal[inherit] | None, default:None) – -
flood_color(Literal[currentColor] | Literal[inherit] | Color | str | None, default:None) – -
filter(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
fill_rule(Literal[nonzero, evenodd] | Literal[inherit] | None, default:None) – -
fill_opacity(Annotated[float, AllowInfNan, AfterValidator] | Literal[inherit] | None, default:None) – -
fill(Literal[none] | Literal[currentColor, context - fill, context - stroke] | Literal[inherit] | Color | Annotated[FuncIri, BeforeValidator] | Literal[freeze, remove] | None, default:None) – -
enable_background(Literal[accumulate] | Literal[inherit] | str | None, default:None) – -
dominant_baseline(Literal[auto] | Literal[use - script, no - change, reset - size, ideographic, alphabetic, hanging, mathematical, central, middle, text - after - edge, text - before - edge] | Literal[inherit] | None, default:None) – -
display(Literal[block, compact, inline - table, inline, list - item, marker, 'run-in', table - caption, table - cell, table - column - group, table - column, table - footer - group, table - header - group, table - row - group, table - row, table] | Literal[none] | Literal[inherit] | None, default:None) – -
direction(Literal[ltr, rtl] | Literal[inherit] | None, default:None) – -
cursor(Annotated[FuncIri, BeforeValidator] | Literal[auto] | Literal[crosshair, default, pointer, move, e - resize, ne - resize, nw - resize, n - resize, se - resize, sw - resize, s - resize, w - resize, text, wait, help] | Literal[inherit] | Annotated[list[Annotated[FuncIri, BeforeValidator] | Literal[auto] | Literal[crosshair, default, pointer, move, e - resize, ne - resize, nw - resize, n - resize, se - resize, sw - resize, s - resize, w - resize, text, wait, help]], BeforeValidator] | None, default:None) – -
color_rendering(Literal[auto] | Literal[optimizeSpeed, optimizeQuality] | Literal[inherit] | None, default:None) – -
color_profile(Literal[auto] | Literal[sRGB] | str | Annotated[Iri, BeforeValidator] | Literal[inherit] | None, default:None) – -
color_interpolation_filters(Literal[auto] | Literal[sRGB, linearRGB] | Literal[inherit] | None, default:None) – -
color_interpolation(Literal[auto] | Literal[sRGB, linearRGB] | Literal[inherit] | None, default:None) – -
color(Literal[currentColor] | Literal[inherit] | Color | None, default:None) – -
clip_rule(Literal[nonzero, evenodd] | Literal[inherit] | None, default:None) – -
clip_path(Annotated[FuncIri, BeforeValidator] | Literal[none] | Literal[inherit] | None, default:None) – -
clip(str | Literal[auto] | Literal[inherit] | None, default:None) – -
baseline_shift(Literal[baseline, sub, super] | Annotated[Length, BeforeValidator] | Literal[inherit] | None, default:None) – -
alignment_baseline(Literal[auto] | Literal[inherit] | Literal[baseline, before - edge, text - before - edge, middle, central, after - edge, text - after - edge, ideographic, alphabetic, hanging, mathematical] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
TransferFunctionAttrs ¶
Bases: AmplitudeAttr, ExponentAttr, InterceptAttr, OffsetNumberAttr, SlopeAttr, TableValuesAttr, TypeFeFuncAttr
The transfer function attributes.
From the SVG 1.1 specification:
"[...] apply to sub-elements
feFuncR,feFuncG,feFuncBandfeFuncAthat define the transfer functions."
Parameters:
-
type(Literal[identity, table, discrete, linear, gamma] | None, default:None) – -
tableValues(Annotated[list[Annotated[float, AllowInfNan]], BeforeValidator] | None, default:None) – -
slope(Annotated[float, AllowInfNan] | None, default:None) – -
offset(Annotated[float, AllowInfNan] | None, default:None) – -
intercept(Annotated[float, AllowInfNan] | None, default:None) – -
exponent(Annotated[float, AllowInfNan] | None, default:None) – -
amplitude(Annotated[float, AllowInfNan] | None, default:None) –
Source code in src/svglab/attrs/attrgroups.py
XlinkAttrs ¶
Bases: HrefAttr, XlinkActuateOnLoadAttr, XlinkArcroleAttr, XlinkHrefAttr, XlinkRoleAttr, XlinkShowAttr, XlinkTitleAttr, XlinkTypeAttr
The XLink attributes.
From the SVG 1.1 specification:
"The XLink attributes are the seven attributes defined in the XML Linking Language specification, which are used on various SVG elements that can reference resources."
Parameters:
-
xlink_type(Literal[simple] | None, default:None) – -
xlink_title(str | None, default:None) – -
xlink_show(Literal[new, replace, embed, other, none] | None, default:None) – -
xlink_role(Annotated[Iri, BeforeValidator] | None, default:None) – -
xlink_href(Annotated[Iri, BeforeValidator] | None, default:None) – -
xlink_arcrole(Annotated[Iri, BeforeValidator] | None, default:None) – -
xlink_actuate(Literal[onLoad] | None, default:None) – -
href(Annotated[Iri, BeforeValidator] | None, default:None) –