Skip to content

Support for rem values in min()/max() #6697

Closed
@Enyium

Description

@Enyium

min()/max() already support some type heterogeneity: You can use px with phx. However, to specify one of the values as a rem value, you have to multiply with root.default-font-size:

export component AppWindow inherits Window {
    property <length> size: 50px;

    Rectangle {
        min-width: max(20 /*rem*/ * root.default-font-size, root.size);
        background: skyblue;
    }
}

Is there a chance that rem values can be mixed with px/phx in min()/max() (and maybe others like clamp() and mod())? It would look like this:

export component AppWindow inherits Window {
    property <length> size: 50px;

    Rectangle {
        min-width: max(20rem, root.size);
        background: skyblue;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions