afonsolage / bevy_ecss

Bevy crate which uses a subset of CSS to update Bevy ECS components
Apache License 2.0
98 stars 11 forks source link

Style doesn't update if the entity changes #39

Closed afonsolage closed 9 months ago

afonsolage commented 9 months ago

If the entity changes, the new matching style doesn't update.

Given the following CSS:

#red-bg {
    background-color: red;
}

#blue-bg {
    background-color: blue;
}

If I change some entity during the runtime from Name("red-bg") to Name("blue-bg") the style doesn't update. I have to manually update the StyleSheet in order to do so.