Bevy ECSS
What is Bevy ECSS?
Bevy ECSS is a crate which allows the usage of a subset of CSS
to interact with bevy_ecs
. It's mainly aimed to apply styling on bevy_ui
but it can be used by any component by implementing custom properties.
Why the name?
Just because Bevy ECS + CSS is a perfect fit!
Docs site
Reference guide, examples and more available here: docs
Usage
To use Bevy ECSS just add a StyleSheet
with a loaded css
file to any entity and all style sheet rules will be applied to the entity and all its descendants
(children of children of children and so on).
use *;
use *;
That's it, now your UI will indeed look awesome!
Bevy support table
bevy | bevy_ecss |
---|---|
0.8 | 0.1 |
0.9 | 0.2 |
0.10 | 0.3 |
0.11 | 0.4 |
0.12 | 0.5 |
0.12 | 0.6 |
0.13 | 0.7 |
Contributing
Got some idea, feedback, question or found any bug? Feel free to open an issue at any time!
License
Bevy ECSS is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.