Re: [fxtf-drafts] [css-masking] Disabling masks and clipPaths when display is none (#245)

The SVG Working Group just discussed `Disabling masks and clipPaths when display is none`.

<details><summary>The full IRC log of that discussion</summary>
&lt;AmeliaBR> Topic: Disabling masks and clipPaths when display is none<br>
&lt;AmeliaBR> GitHub: https://github.com/w3c/fxtf-drafts/issues/245<br>
&lt;AmeliaBR> Dirk: Question is what happens when `display: none` on the &lt;mask> or &lt;clipPath> element itself.<br>
&lt;AmeliaBR> ... I uploaded some test results<br>
&lt;AmeliaBR> ... most browers disable the effect (as if you didn't specify a clip-path). But there are discrepancies when the effect is on HTML elements.<br>
&lt;AmeliaBR> ... (for browsers/effects which are supported on HTML element, `display: none` is treated as if the mask was full transparent / clipPath was empty. So the element with the effect disappears.<br>
&lt;AmeliaBR> Dirk: Not sure what to do with that, but for SVG effects on SVG elements, it looks like we have consistency.<br>
&lt;AmeliaBR> Dirk: I'd recommend standardizing that: if clip-path or mask property references an element with `display: none`, treat it the same as if it referenced a non-existant element, so no effect.<br>
&lt;AmeliaBR> Chris: Does this only apply if `display: none` is directly set on the element itself, or does it also imply by inheritance, e.g., from `&lt;defs display="none">`.<br>
&lt;AmeliaBR> ... Because a defs is general defined as the same as display: none.<br>
&lt;krit> https://codepen.io/anon/pen/eomKyj<br>
&lt;AmeliaBR> Amelia: And it also depends on the spec text. Assuming the SVG 1 spec was implemented (display: none has no effect), we rewrote it to define these elements as having a `display: none !important` user agent style so it could be defined with CSS. But that doesn't work if display: none actually has an effect.<br>
&lt;krit> https://codepen.io/anon/pen/qwEKpG<br>
&lt;AmeliaBR> Dirk: After a quick test, it looks like an explicit `display: none` on the defs element does disable the child masks / clipPaths, in Blink and WebKit.<br>
&lt;AmeliaBR> Amelia: Since we have consistency between browsers, there may be content depending on it, we should change the spec to match. But we need to figure out what that is, and how to define it clearly. And whether it applies to other elements, e.g., filter effects.<br>
&lt;AmeliaBR> Dirk: Yes, so we need to do some comparison, e.g., for the defs issue. But I think we should focus on masks / clipPath for now.<br>
&lt;AmeliaBR> Amelia: The same text about display not having an effect is used in many parts of the spec. If we're going to rewrite it, we need to figure out how much need to edit.<br>
&lt;AmeliaBR> Dirk: Can we agree on the `display: none` for the mask and clipPath element?<br>
&lt;AmeliaBR> Amelia: I think we need to do more testing first. Go through all the elements in SVG that have the same rules.<br>
&lt;AmeliaBR> Dirk: But these aren't in the SVG spec anymore, they're in CSS Masking.<br>
&lt;AmeliaBR> Amelia: Are you in a rush to republish?<br>
&lt;AmeliaBR> Dirk: No, but we don't want edits on one spec to wait for the other.<br>
&lt;AmeliaBR> Amelia: But we do want to make sure that the final edits are consistent.<br>
&lt;AmeliaBR> Dirk: OK, so you want to get data for all SVG effects, like gradients and patterns and so on?<br>
&lt;AmeliaBR> Amelia: Yep. Should probably open a dedicated issue on the SVG repo. And filter effects, too.<br>
&lt;AmeliaBR> Dirk: There's already one on Filters (https://github.com/w3c/fxtf-drafts/issues/130)<br>
&lt;AmeliaBR> ... it's also on the agenda, but I guess we should also defer until we get full data.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/245#issuecomment-478734911 using your GitHub account

Received on Monday, 1 April 2019 20:28:48 UTC