-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-masking-1] Clarification on mask-type presentation attribute #480
Comments
...snip...
Correct.
What mechanism examples use does not really carry any relevance. I.e they are not normative.
This looks like an oversight/bug.
It's not uncommon for a presentation attribute to not have a corresponding IDL attribute (most on SVG elements don't).
The term "DOM attribute" may be a bit ambiguous, so I'd suggest using the terminology from [1]. Using that terminology I'd say that there is a content attribute [1] https://html.spec.whatwg.org/multipage/infrastructure.html#terminology |
@fsoder so that means HTML like |
Yes (assuming the |
Thanks! for some feedback: from a reader's perspective, this style of specification (where HTML attributes and/or DOM element properties are not explicitly listed, but must be inferred) is very confusing and hard to understand (and thus, likely easier to implement incorrectly). |
I was hoping to clarify if
mask-type
should be assignable as a DOM attribute.From the spec:
The definition of a presentation attribute from the SVG 1.1 Spec:
From the styling section of the same spec, 6.4 Specifying properties using the presentation attributes, this is perhaps also relevant:
This leads me to believe that all presentation attributes should be available as an attribute on applicable DOM elements- meaning the following is valid:
Looking at this codepen example, it seems Chrome, Firefox, and Safari accept the attribute.
However, the examples shown in the draft masking spec seem to make a point of using inline style attributes:
And indeed, MDN does the same.
I also noticed that
mask-type
is not listed under the presentation attributes for themask
element (which seems contradictory), nor is it included in theSVGMaskElement
interface.This leads me to believe that
mask-type
might not be intended as a DOM attribute. I'd appreciate any guidance available on this topic.Thanks!
The text was updated successfully, but these errors were encountered: