Skip to content

[Refact] Responsive max-width classes instead of inline styles #59

@lorant-one

Description

@lorant-one

Flex applies responsive width with inline styles, such as "max-width: var(--responsive-width-xl)" for maxWidth="xl" prop. We should create global classes in the appropriate SCSS file in the "styles" folder for max-width, since they are commonly used in Once UI. Then, change the logic in both the Grid and Flex for applying the classes instead of inline styles.

This would improve code structure and consistency of the DOM and slightly improve performance.

Since responsive sizing is very rarely used for minWidth, width, and height related props, let's just add them for maxWidth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions