Re: [csswg-drafts] [css-images] @image rule for manipulating images (#6807)

> > This is definitely an interesting approach that would probably make animation easier and easily allow applying manipulations in order. Though I assume it may also quickly get quite complicated syntax-wise.
> 
> Nah, not particularly, it would just be `image(<source>, <manipulation-fn>*)`, where all the manipulation-fns are things like `repeat(...)` or `rotate(...)`. For larger sets of transforms you'd likely format it similarly to an at-rule, like:
> 
> ```css
> :root {
>   --hero-image: image("hero-base.png",
>     rotate(...)
>     repeat(...)
>     sepia(...)
>   );
> }
> ```

The downside of that is that is that it doesn't align with existing properties and you might not be able to express everything with that like e.g. `width` or `height` in combination with `aspect-ratio` or `object-fit`.
Though it does seem easier to understand in regard of the order of manipulations and it is more condense.

Sebastian

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 18 October 2022 21:06:41 UTC