Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto percentages take priority over max and min sizes #1018

Open
Aiving opened this issue Dec 23, 2024 · 0 comments
Open

Auto percentages take priority over max and min sizes #1018

Aiving opened this issue Dec 23, 2024 · 0 comments
Assignees
Labels
enhancement 🔥 New feature or request layout 📐 Relate to layout
Milestone

Comments

@Aiving
Copy link
Contributor

Aiving commented Dec 23, 2024

When using a (also called auto percentages) they take precedence over the minimum and maximum size of the element, so that if you set an element to min_height: "32" and height: "0a" then its height will be 0 pixels rather than the expected 32 pixels.

Minimum code to reproduce:

use freya::prelude::*;

fn main() {
    launch(app);
}

fn app() -> Element {
    rsx! {
        rect {
            main_align: "center",
            cross_align: "center",
            background: "red",
            width: "128",
            min_height: "32",
            height: "0a",
            overflow: "clip",

            label {
                "Hello world!"
            }
        }
    }
}
@marc2332 marc2332 self-assigned this Dec 23, 2024
@marc2332 marc2332 added enhancement 🔥 New feature or request layout 📐 Relate to layout labels Dec 23, 2024
@marc2332 marc2332 moved this to Todo in Freya Planning Dec 23, 2024
@marc2332 marc2332 added this to the 0.3.0 milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request layout 📐 Relate to layout
Projects
Status: Todo
Development

No branches or pull requests

2 participants