Reputation: 13
Recently, i have to dig into w3c specification, it's really mess :( while i reading specifications, i wonder Why SVG element definition in w3c always has full presentation attributes?
for example in 'mask' element definition
from: http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#MaskElement
Attributes:
conditional processing attributes — ‘requiredFeatures’, ‘requiredExtensions’, ‘systemLanguage’
core attributes — ‘id’, ‘xml:base’, ‘xml:lang’, ‘xml:space’
presentation attributes — ‘alignment-baseline’, ‘baseline-shift’, ‘clip’, ‘clip-path’, ‘clip-rule’, ‘color’, ‘color-interpolation’, ‘color-interpolation-filters’, ‘color-profile’, ‘color-rendering’, ‘cursor’, ‘direction’, ‘display’, ‘dominant-baseline’, ‘enable-background’, ‘fill’, ‘fill-opacity’, ‘fill-rule’, ‘filter’, ‘flood-color’, ‘flood-opacity’, ‘font-family’, ‘font-size’, ‘font-size-adjust’, ‘font-stretch’, ‘font-style’, ‘font-variant’, ‘font-weight’, ‘glyph-orientation-horizontal’, ‘glyph-orientation-vertical’, ‘image-rendering’, ‘kerning’, ‘letter-spacing’, ‘lighting-color’, ‘marker-end’, ‘marker-mid’, ‘marker-start’, ‘mask’, ‘opacity’, ‘overflow’, ‘pointer-events’, ‘shape-rendering’, ‘stop-color’, ‘stop-opacity’, ‘stroke’, ‘stroke-dasharray’, ‘stroke-dashoffset’, ‘stroke-linecap’, ‘stroke-linejoin’, ‘stroke-miterlimit’, ‘stroke-opacity’, ‘stroke-width’, ‘text-anchor’, ‘text-decoration’, ‘text-rendering’, ‘unicode-bidi’, ‘visibility’, ‘word-spacing’, ‘writing-mode’
‘class’
‘style’
‘externalResourcesRequired’
‘x’
‘y’
‘width’
‘height’
‘maskUnits’
‘maskContentUnits’
presentation attributes always has full attributes but there are some of them is active with 'mask' element! Why does w3c just show active attribute?
======================================================================
maybe question is not clear, sorry for that, my English is really bad :(
one more example for my question is ‘flood-color’ attribute
from: http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodColorProperty
‘flood-color’
Value: currentColor |
<color> [<icccolor>] |
inherit
Initial: black
Applies to: ‘feFlood’ elements
Inherited: no
Percentages: N/A
Media: visual
Animatable: yes
you can see that: "Applies to: ‘feFlood’ elements" but when you see all attributes of 'mask' element above you also see ‘flood-color’ in there. So i wonder is ‘flood-color’ attribute active with 'mask' element or only active with 'feFlood' element? If not active with 'mask' why w3c list it in attributes of 'mask' element?
Sorry again for my English. Thank you so much!
Upvotes: 0
Views: 84
Reputation: 124249
The w3c wrote it this way because they thought it would be easier for implementers if all presentation attributes could be put on all elements regardless of whether they had any effect.
Upvotes: 1