diff --git a/scalatags/shared/src/main/scala/scalatags/generic/Bundle.scala b/scalatags/shared/src/main/scala/scalatags/generic/Bundle.scala index 43df7611..2fc178c1 100644 --- a/scalatags/shared/src/main/scala/scalatags/generic/Bundle.scala +++ b/scalatags/shared/src/main/scala/scalatags/generic/Bundle.scala @@ -75,7 +75,7 @@ trait Bundle[Builder, Output <: FragT, FragT] extends Aliases[Builder, Output, F val svgTags: SvgTags /** - * SVG only attributes + * SVG attributes */ val svgAttrs: SvgAttrs } @@ -87,6 +87,7 @@ trait Aliases[Builder, Output <: FragT, FragT]{ type Styles = generic.Styles[Builder, Output, FragT] type Styles2 = generic.Styles2[Builder, Output, FragT] type SvgTags = generic.SvgTags[Builder, Output, FragT] + type SvgOnlyAttrs = generic.SvgOnlyAttrs[Builder, Output, FragT] type SvgAttrs = generic.SvgAttrs[Builder, Output, FragT] type Util = generic.Util[Builder, Output, FragT] type AttrPair = generic.AttrPair[Builder, FragT] diff --git a/scalatags/shared/src/main/scala/scalatags/generic/SvgAttrs.scala b/scalatags/shared/src/main/scala/scalatags/generic/SvgAttrs.scala index 457da395..0a01886d 100644 --- a/scalatags/shared/src/main/scala/scalatags/generic/SvgAttrs.scala +++ b/scalatags/shared/src/main/scala/scalatags/generic/SvgAttrs.scala @@ -12,8 +12,10 @@ package generic import acyclic.file - -trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT] { +/** + * A list of SVG Attributes not also found in Attrs + */ +trait SvgOnlyAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, FragT] { /** * This attribute defines the distance from the origin to the top of accent characters, @@ -191,23 +193,6 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr val calcMode = "calcMode".attr - /** - * Assigns a class name or set of class names to an element. You may assign the same - * class name or names to any number of elements. If you specify multiple class names, - * they must be separated by whitespace characters. - * The class name of an element has two key roles: - * -As a style sheet selector, for use when an author wants to assign style - * information to a set of elements. - * -For general usage by the browser. - * The class can be used to style SVG content using CSS. - * - * Value - * - * MDN - */ - val `class` = "class".attr - - /** * The clip attribute has the same parameter values as defined for the css clip property. * Unitless values, which indicate current user coordinates, are permitted on the coordinate @@ -669,8 +654,6 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr */ val imageRendering = "imageRendering".attr - val id = "id".attr - /** * * @@ -874,24 +857,6 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr val mask = "mak".attr - - /** - * - * - * MDN - */ - val max = "max".attr - - - - /** - * - * - * MDN - */ - val min = "min".attr - - /** * * @@ -1287,15 +1252,6 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr val strokeWidth = "stroke-width".attr - /** - * - * - * MDN - */ - val style = "style".attr - - - /** * * @@ -1360,14 +1316,6 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr val transform = "transform".attr - /* - * - * - * MDN - */ - val `type`= "type".attr - - /* * * @@ -1479,12 +1427,12 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr val xmlSpace = "xml:space".attr - /** + /* * * * MDN */ - val xmlns = "xmlns".attr + val y = "y".attr /* @@ -1492,7 +1440,7 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr * * MDN */ - val y = "y".attr + val y1 = "y1".attr /* @@ -1500,7 +1448,7 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr * * MDN */ - val y1 = "y1".attr + val y2 = "y2".attr /* @@ -1508,7 +1456,7 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr * * MDN */ - val y2 = "y2".attr + val yChannelSelector = "yChannelSelector".attr /* @@ -1516,7 +1464,54 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr * * MDN */ - val yChannelSelector = "yChannelSelector".attr + val z = "z".attr +} + +/** + * All SVG Attributes + */ +trait SvgAttrs[Builder, Output <: FragT, FragT] extends SvgOnlyAttrs[Builder, Output, FragT] { + /** + * Assigns a class name or set of class names to an element. You may assign the same + * class name or names to any number of elements. If you specify multiple class names, + * they must be separated by whitespace characters. + * The class name of an element has two key roles: + * -As a style sheet selector, for use when an author wants to assign style + * information to a set of elements. + * -For general usage by the browser. + * The class can be used to style SVG content using CSS. + * + * Value + * + * MDN + */ + val `class` = "class".attr + + val id = "id".attr + + + /** + * + * + * MDN + */ + val max = "max".attr + + + /** + * + * + * MDN + */ + val min = "min".attr + + + /** + * + * + * MDN + */ + val style = "style".attr /* @@ -1524,5 +1519,13 @@ trait SvgAttrs[Builder, Output <: FragT, FragT] extends Util[Builder, Output, Fr * * MDN */ - val z = "z".attr + val `type`= "type".attr + + + /** + * + * + * MDN + */ + val xmlns = "xmlns".attr }