Re: [svgwg] Add support for the `hidden`-attribute

This would be another case of [synchronizing with `HTMLElement`](https://github.com/w3c/svgwg/issues/395).

One complications, is that we would need to decide precedence relative to regular presentation attributes. (CSS rules would override, same as for HTML elements.)

As I mentioned to Michiel before, I really don't see a _need_ for a new attribute in SVG.  And I find it confusing that an attribute named `hidden` sets `display: none` in the UA stylesheet, not `visibility: hidden`.

But it is clearly a confusion for authors who expect it to be a universal attribute.

This is especially likely if they have in the past used a compatibility rule in their stylesheet (for older browsers) that didn't distinguish by namespace: `[hidden] {display: none}` will affect all elements with the attribute, even SVG. Native [support for the HTML attribute](https://caniuse.com/#feat=hidden) is now good enough that devs might be using `hidden` without that extra rule, and so are only now discovering that the native implementations don't include SVG.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/508#issuecomment-408903128 using your GitHub account

Received on Monday, 30 July 2018 15:24:37 UTC