bevyengine / bevyengine/bevy

bevy_ui: Implement Val::ObjectFit for width and height fields on bevy_ui::ui_node::Style

Open
#15,297 0 comments 0 reactions 0 assignees View on GitHub
A-UI C-Feature C-Usability D-Modest S-Ready-For-Implementation
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.