Implement CSS attr()

External Issue #7822455


Jen S.
Jun 8, 2016
This issue is public.
Found in
  • Microsoft Edge
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

We need attr() for pairing with CSS Shapes. Here’s an example in the spec:

img {shape-outside: attr(src url);} allows authors to use CSS Shapes easily in a CMS context, where the CSS can specify: “please make a shape and use the content image itself as the mask” — and that’s all that’s needed.

Otherwise custom inline CSS is needed for each non-regular instance of CSS Shapes inside a CMS. (The system could specify in CSS the same shape, like a circle, for every image. But not if the image shape is different each time.)

Like this:
<img src="foo.jpg" style="shape-outside: url(foo.jpg); />

This is much harder for authors to implement, given the reality of constrains of most systems. Having attr() will make it possible to use CSS Shapes much more often.


0 attachments

    Comments and activity

    You need to sign in to your Microsoft account to add a comment.

    Sign in