bevy_ui: Implement Val::ObjectFit for width and height fields on bevy_ui::ui_node::Style
- 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?
It's awkward to size and position multiple child UI elements without this property.
## What solution would you like?
Implement the behavior of this CSS property for width and height fields of Style. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
The solution you propose for the problem presented.
## What alternative(s) have you considered?
Other solutions to solve and/or work around the problem presented.
Contributor guide
Research direction
Start by locating bevy_ui::ui_node::Style and the Val::ObjectFit definition or handling. Read the linked CSS object-fit reference to understand the expected width and height behavior, then identify the relevant UI layout path. Done means Style applies object-fit behavior consistently for both fields, with tests or examples covering the supported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100