bevy_ecss icon indicating copy to clipboard operation
bevy_ecss copied to clipboard

Add support for `ImageScaleMode`

Open Xenira opened this issue 9 months ago • 3 comments

I would like to add ImageScaleMode.

My proposal would be to use image-rendering css property for this. While it is not an exact match it is the closest I could find. Would look something like

image-rendering: sliced stretch 28

Got a basic impl done, but still needs some cleanup.

Xenira avatar May 05 '24 14:05 Xenira

It wont be possible to keep a css match for bevy UI, since bevy UI itself doesn't have this goal.While there are some overlap, I think would be better to use bevy dialect, something like:

image-scale-mode: sliced | tiled

afonsolage avatar May 06 '24 07:05 afonsolage

I like the idea of using something bevy specific. Maybe use a vendor prefix as well, to clarify, that its bevy:

-bevy-image-scale-mode: sliced <stretch | tile int>...| tiled bool bool number

Xenira avatar May 06 '24 10:05 Xenira

While this is a good idea, -bevy will be the default, so this can become annoying to add this prefix on every property, IMO. This can be useful if/when we have some conflict, like there is a valid css property with this name and another bevy component with the same name.

afonsolage avatar May 06 '24 17:05 afonsolage