afonsolage / bevy_ecss

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

Style doesn't update if the entity changes #39

Closed afonsolage closed 12 months ago

afonsolage commented 1 year 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.