W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [css-images] [css-gcpm] Overloaded definitions of element() (#1981)

From: Mike Bremford via GitHub <sysbot+gh@w3.org>
Date: Fri, 02 Oct 2020 14:07:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-702754877-1601647651-sysbot+gh@w3.org>
Another solution would be to merge `element()` with `url()`, rather than with `image()`.

* SVG already uses `fill: url(#patternid)` to reference a `<pattern>` element.
* css-masking-1 uses `mask: url(#maskid)` to reference a `<mask>` element.
* [css-fill-stroke](https://drafts.fxtf.org/fill-stroke/#fill-image) proposes a `fill-image` property which is to be the same as `background-image` - i.e. it takes a URL. For consistency with SVG this really has to allow a `url()` to a `<pattern>` element.

In all these cases the functionality is exactly the same as what's proposed with `element()`.

It seems weird that while I can `fill: url(#patternid)` in SVG, in CSS I would have to do `background-image: element(#patternid)` to achieve the same thing (as suggested by an example in css-images-4).

And what about `mask: element(#maskid)`? It's a synonym for `url(#maskid)`.

GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1981#issuecomment-702754877 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 2 October 2020 14:07:34 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:20 UTC