Due to the properties being allowed to apply in parallel systems, and no ordering or culling of rules provided, the CSS order is not respected.
CSS specifies rule priority as follows:
Rule specificity (more specific rules override less specific ones)
Rule order within file (properties defined in later rules override earlier ones)
And while not part of CSS, I think it would be ideal to have the ECS hierarchy also be implied. This would mean that rules specified on a StyleSheetAsset in a child entity, override those defined on a StyleSheetAsset attached to the parent entity.
I have an implementation where the ordering has been fixed, and managed to keep the asyncronous application of properties, through a builder step in the perpare_state(...) system. However my commit log was quite experimental. My fork also includes the mentioned node hierarchy, and pseudo-class support, so I can't throw it immediately into a PR.
If someone is kind enough to create a clean PR from my fork I'm sure many would benefit from this fix (I can get around to it myself eventually but would like to focus on my game now I've fixed my issue).
Due to the properties being allowed to apply in parallel systems, and no ordering or culling of rules provided, the CSS order is not respected.
CSS specifies rule priority as follows:
And while not part of CSS, I think it would be ideal to have the ECS hierarchy also be implied. This would mean that rules specified on a
StyleSheetAsset
in a child entity, override those defined on aStyleSheetAsset
attached to the parent entity.I have an implementation where the ordering has been fixed, and managed to keep the asyncronous application of properties, through a builder step in the
perpare_state(...)
system. However my commit log was quite experimental. My fork also includes the mentioned node hierarchy, and pseudo-class support, so I can't throw it immediately into a PR. If someone is kind enough to create a clean PR from my fork I'm sure many would benefit from this fix (I can get around to it myself eventually but would like to focus on my game now I've fixed my issue).