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

Change CSS class naming convention to PascalCase to align with MUI #274

Open
Tracked by #21415
brionmario opened this issue Oct 8, 2024 · 0 comments
Open
Tracked by #21415
Labels
package:react Issues/PRs related to the `@oxygen-ui/react` package.

Comments

@brionmario
Copy link
Member

Is your suggestion related to an experience? Please describe.

We are currently using kebab-case CSS classes for our wrapped components. ex (oxygen-text-field). But MUI uses pascal case for their components. This results in inconsistent naming conventions across our styles, making it harder to maintain and creating potential conflicts between different design systems.

Ex:

.oxygen-text-field {
    .MuiOutlinedInput-root {
        border-radius: 8px;
        font-family: Gilmer;
    }
}

Currently MUI supports an experimental ClassName generator but this has some caveats that make it harder to transform the classnames right now.

Describe the improvement

Adopt a pascal case CSS class naming convention to align with MUI. (.Oxygen<COMPONENT_NAME>-<VARIANT>)

Ex:

- .oxygen-text-field {
+ .OxygenTextField-root {
    .MuiOutlinedInput-root {
        border-radius: 8px;
        font-family: Gilmer;
    }
}

Additional context
N/A

@brionmario brionmario added the package:react Issues/PRs related to the `@oxygen-ui/react` package. label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:react Issues/PRs related to the `@oxygen-ui/react` package.
Projects
None yet
Development

No branches or pull requests

1 participant