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

Extend `overflow` property #15

Open Rynibami opened 2 years ago

Rynibami commented 2 years ago

The current implementation of the overflow property follows the grammar overflow: [visible | hidden]; which is awesome, but I lack the scroll-like values. The css documentation of the W3C describes that the overflow property may have the following values:

In addition to this extension, I would like to suggest to add the overflow-x and overflow-y as well for ease of use.

TheBeardedQuack commented 1 year ago

The overflow property within this crate maps to the bevy::ui::Overflow enum in bevy.

Unless BevyUI intends on getting as close to web UI as it can (which may not be sensible) the best solution may be to create your own ScrollableBundle to attach to an entity in the UI. You can then customise the rendering of your children and scrollbar as best fits the project.