bevyengine / bevyengine/bevy

Use macros to generate `bevy_ui` layouts from CSS strings

Open
#8,769 1 comment 0 reactions 0 assignees View on GitHub
A-UI C-Usability X-Needs-SME
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

I am new to rust and bevy. I came from node and web background and I can honestly say writing UI with the current version of bevy_ui is very hard. (0.10.1)

## What solution would you like?

if it's mimicing exactly css flexbox is it posible to use valid css string?

**example css_str:**
```scss
.ComponentName {
display: flex;
flex-direction: column;
justify-content: center;

.ChildComponent1 {
/* ... */
}
}
```

if you impelement FromStr or macro or something...
```rust
commands.spawn(from_css_str!(css_str))
```
## What alternative(s) have you considered?

as an example main_menu_style.css file in the `assets/styles/` folder and `asset_server.load(styles/main_menu_style.css)` and use asset with a macro or etc.

## Additional context

if bevy graphical ui happens some time in the future users will feel forced to use the graphical ui to create game ui becase of these too much verbosity. also considering gridbox is a thing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.