Open Rynibami opened 2 years 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.
The current implementation of the
overflow
property follows the grammaroverflow: [visible | hidden];
which is awesome, but I lack thescroll
-like values. The css documentation of the W3C describes that theoverflow
property may have the following values:visible
- Default. The overflow is not clipped. The content renders outside the element's box.hidden
- The overflow is clipped, and the rest of the content will be invisible.scroll
- The overflow is clipped, and a scrollbar is added to see the rest of the content.auto
- Similar to scroll, but it adds scrollbars only when necessary.In addition to this extension, I would like to suggest to add the
overflow-x
andoverflow-y
as well for ease of use.