[fxtf-drafts] [css-masking-1] Clarification on mask-type presentation attribute (#480)

sandgraham has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [css-masking-1] Clarification on mask-type presentation attribute ==
I was hoping to clarify if `mask-type` should be assignable as a DOM attribute.

From the [spec](https://drafts.fxtf.org/css-masking/#the-mask-type):

> The [mask-type](https://drafts.fxtf.org/css-masking/#propdef-mask-type) property is a [presentation attribute](https://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermPresentationAttribute) for SVG elements.

The definition of a **presentation attribute** from the [SVG 1.1 Spec](https://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermPresentationAttribute):
> An XML attribute on an SVG element which specifies a value for a given [property](https://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermProperty) for that element.

From the styling section of the same spec, [6.4 Specifying properties using the presentation attributes](https://www.w3.org/TR/2011/REC-SVG11-20110816/styling.html#UsingPresentationAttributes), this is perhaps also relevant:
> For each styling property defined in this specification (see [Property Index](https://www.w3.org/TR/2011/REC-SVG11-20110816/propidx.html)), there is a corresponding XML attribute (the presentation attribute) with the same name that is available on all relevant SVG elements.

This leads me to believe that all presentation attributes should be available as an attribute on applicable DOM elements- meaning the following is valid:

```html
<mask id="mask" mask-type="alpha">
  <path d="..." />
</mask>
``` 

However, the examples shown in the draft masking spec seem to make a point of using inline style attributes:

```html
<mask id="mask" style="mask-type: alpha;">
  <path d="..." />
</mask>
```

I noticed that `mask-type` is not listed under the [presentation attributes](https://drafts.fxtf.org/css-masking/#the-mask-type) for the `mask` element (which seems contradictory), nor is it included in the [`SVGMaskElement` interface](https://drafts.fxtf.org/css-masking/#InterfaceSVGMaskElement).

This leads me to believe that `mask-type` might not be intended as a DOM attribute but I'd appreciate any guidance available on this topic.

Thanks!


Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/480 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 17 November 2022 00:04:56 UTC