Re: [csswg-drafts] Request for New CSS Property: 'mask-rotation' (#10024)

This use case is covered by the `@image` rule we [resolved on](https://github.com/w3c/csswg-drafts/issues/6807#issuecomment-1248380039).

Examples:

```css
@image --rotate {
  rotate: 45deg;
}

@image --flip-vertically {
  transform: rotateX(180deg);
}

.element {
    mask-image: image(url('mask.png'), --rotate);
    mask-size: cover;
}

.element {
    mask-image: image(url('mask.png'), --flip-vertically);
    mask-size: cover;
}
```

This has two major advantages over new properties:

1. It can be used everywhere were images are allowed and is not limited to masks.
2. It allows all kinds of image manipulations and is not limited to rotations.

So I vote to close this in favor of the more general solution.

Sebastian

PS: @Thiago2104 Your second example rotates the image by 90 degrees along the y-axis, which effectively makes it invisible.

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


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

Received on Saturday, 9 March 2024 00:57:11 UTC