- From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
- Date: Thu, 23 Mar 2023 09:03:39 +0000
- To: public-css-archive@w3.org
@brandonmcconnell I actually also like your approach, just wanted to outline that there is already something targetting the SVG styling issues we currently have. You outlined the differences quite well. And those differences indicate their advantages and disadvantages. From a CSS author's perspective, the big advantage of this proposal is that they are in full control of styling the SVGs. Though this may be seen as a disadvantage, too, as its easier to violate any copyrights regarding the SVGs when allowing to manipulate them arbitrarily. But that's something that can (roughly) be targeted via the mentioned `disallow-external-styles` or `allow-external-styles`. And the approach here is (at least currently) limited to SVGs referenced in `<img>` elements. The Linked Parameters approach, while mainly focusing on SVG as well, can also target other resources like documents in iframes. From this view, and especially regarding documents in iframes, it makes a lot of sense that both the author's CSS and the resource have to agree on specific parameters for manipulation. So that approach can be seen as an API. Also, this approach is limited to resources referenced via HTML. And because it uses a pseudo-element, it is limited to styling one resource. Though in CSS you can reference different resources like in the following example: ```css .container-with-border { border-image: src('border.svg') 30; background: src('background.svg') center / contain no-repeat; } ``` With Linked Parameters you can style both images individually. With the `::src` approach, styling them is not possible at all. For what it's worth, the approach might also target `<source>`s within `<picture>` elements and possibly other media referencing HTML elements. Sebastian -- GitHub Notification of comment by SebastianZ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8634#issuecomment-1480824882 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 23 March 2023 09:03:41 UTC