- From: Cameron McCormack via GitHub <sysbot+gh@w3.org>
- Date: Fri, 05 Oct 2018 01:30:08 +0000
- To: public-css-archive@w3.org
heycam has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-values-3] serialization of fragment URLs in image properties == https://drafts.csswg.org/css-values-3/#local-urls Should properties that take `<url>`s as images serialize fragment URLs as just the fragment or as the full, resolved URL? The spec doesn't make any distinction between `<url>`s for images and non-images (such as various SVG properties like `marker-start`). The fragment URL concept was introduced to make it easier to use local references for non-image properties when the base value might change, and local URLs don't really make sense for images. Test: https://mcc.id.au/2018/10/url-fragment-serialize.html <details> <summary>Results</summary> <table> <tr><th><th colspan=2>background-image<th colspan=2>mask-image<th colspan=2>filter<th colspan=2>marker-start <tr><th><th>specified<th>computed<th>specified<th>computed<th>specified<th>computed<th>specified<th>computed <tr><th>Chrome<td>url("#x")<td>url("https://mcc.id.au/2018/10/url-fragment-serialize.html#x")<td><td><td>url("#x")<td>url("#x")<td>url("#x")<td>url("#x") <tr><th>Edge<td>url("#x")<td>url(https://mcc.id.au/2018/10/url-fragment-serialize.html#x)<td><td><td>url(#x)<td>none<td>url("#x")<td>url("#x") <tr><th>Firefox<td>url("#x")<td>url("https://mcc.id.au/2018/10/url-fragment-serialize.html#x")<td>url("#x")<td>url("https://mcc.id.au/2018/10/url-fragment-serialize.html#x")<td>url("#x")<td>url("#x")<td>url("#x")<td>url("#x") <tr><th>Safari<td>url("https://mcc.id.au/2018/10/url-fragment-serialize.html#x")<td>url("https://mcc.id.au/2018/10/url-fragment-serialize.html#x")<td><td><td>url("#x")<td>url("#x")<td>url("#x")<td>url("x") </table> </details> All four browsers I tested serialize the computed value of `background-image` with a fragment as the entire resolved URL. (Safari is an odd one out in serializing the entire resolved URL for the specified value, too. And there's a bug in the `marker-start` computed value serialization.) I think it makes sense to treat image and non-image `<url>` values the same way wrt fragment URLs, but since nobody implements this behavior I wanted to check to make sure it's what we all agree with before changing. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3195 using your GitHub account
Received on Friday, 5 October 2018 01:30:11 UTC