Closed
Bug 1214725
Opened 11 years ago
Closed 8 years ago
Add info about attributes to SVG info DB
Categories
(Developer Documentation Graveyard :: Macros/Templates, enhancement)
Developer Documentation Graveyard
Macros/Templates
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: sebo, Unassigned)
References
Details
The SVG JSON DB should contain information about the SVG attributes.
See bug 1212826 comment 2.
Sebastian
| Reporter | ||
Comment 1•10 years ago
|
||
(In reply to Jeremie Patonnier :Jeremie from bug 1212826 comment #7)
> Hi!
>
> SVG attributes are quite complex. It's true that the global vs specific
> distinction is "wrong". To be accurate there is 3 kind of attributes on SVG
> elements:
>
> * Attributes that can be used by all SVG elements (likely some sort of
> "global" attributes)
> https://svgwg.org/svg2-draft/struct.html#TermCoreAttribute
>
> * Attributes that can be used by a given group of SVG elements
> Some spec try to define groups of attributes that apply in bulk to some
> given elements:
> https://svgwg.org/specs/animations/#AdditionAttributes
> https://svgwg.org/specs/animations/#TermAnimationEventAttribute
> https://svgwg.org/specs/animations/#AttributeNameAttribute
> https://svgwg.org/specs/animations/#TimingAttributes
> https://svgwg.org/specs/animations/#ValueAttributes
> https://svgwg.org/svg2-draft/struct.html#TermARIAAttribute
> https://svgwg.org/svg2-draft/struct.html#TermConditionalProcessingAttribute
> https://svgwg.org/svg2-draft/interact.html#TermDocumentEventAttribute
>
> http://www.w3.org/TR/2014/CR-html5-20140204/webappapis.
> html#globaleventhandlers
> https://svgwg.org/svg2-draft/interact.html#TermGraphicalEventAttribute
> https://svgwg.org/svg2-draft/styling.html#PresentationAttributes
> https://svgwg.org/svg2-draft/styling.html#ElementSpecificStyling
> https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs
> ...
> And I'm pretty sure I miss some.
>
> * Attributes that can be used by a single SVG elements
> Basically all attributes that are listed individually within elements
> definition
>
> The fun parts begin with the fact that some attributes can have the same
> name but behave very differently from one element to the another. For
> example: fill which is different for basic shapes and animation elements:
> https://svgwg.org/svg2-draft/painting.html#FillProperty
> https://svgwg.org/specs/animations/#FillAttribute
>
> And of course, there are the presentation attributes than can be used both
> as CSS properties or attributes.
>
> Because of all that mess, the spec do very little difference between
> attributes:
> https://svgwg.org/svg2-draft/attindex.html
>
> Oh, and for what it worth, we should relay on the SVG2 spec draft (and all
> its independent modules) for all things about SVG if we want an accurate
> vision of what really happens within browsers:
>
> SVG 2: https://svgwg.org/svg2-draft/
> SVG Animation: https://svgwg.org/specs/animations/
> SVG Markers: https://svgwg.org/specs/markers/
> SVG Paths: https://svgwg.org/specs/paths/ (no attributes defined)
> SVG Strokes: https://svgwg.org/specs/strokes/
> (Note: SVG fonts have been removed from SVG 2 clear and simple, we shouldn't
> bother documenting that)
>
> I have no idea what should be done in the JSON, but I would tend to make a
> single attribute/element association and if it's possible to do some
> factorization (to avoid documenting things twice), that will be at another
> level.
Comment 2•10 years ago
|
||
I think we should list all attributes individually in the 'element' part of the json.
In the attribute part we may link to a group.
To document, we would have 1 page by elemennt, 1 page per attribute-element (that is the same attribute name in different pages would have a different pages) and summary pages that woould list all attribute of a group (Like 'Addition attributes').
That way people looking for a specific attribute on an element will find it, people looking for all attributes of an element too, as well as people looking for a group of attributes (E.g additive attributes).
Comment 3•8 years ago
|
||
This will be tracked on GitHub going forward.
See https://github.com/mdn/data/issues/59
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•