Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor styles to follow MUI #4062

Open
2 tasks
VakarisZ opened this issue Feb 6, 2024 · 1 comment
Open
2 tasks

Refactor styles to follow MUI #4062

VakarisZ opened this issue Feb 6, 2024 · 1 comment
Labels
Refactor UI:refactoring Issues related to refactoring to next.js

Comments

@VakarisZ
Copy link
Contributor

VakarisZ commented Feb 6, 2024

Refactor

something.module.scss don't follow the styling practices outlined in MUI documentation, usage of themes are a lot harder from there. Instead, we should refactor our styling approach as outlined in MUI customization guide

Tasks

  • Replace something.module.scss files with style objects importable by MUI objects
  • Extend/validate styling/UI guidelines to explain best approaches and provide links to useful documentation @VakarisZ
@VakarisZ VakarisZ added Refactor UI:refactoring Issues related to refactoring to next.js labels Feb 6, 2024
@cakekoa
Copy link
Contributor

cakekoa commented Feb 6, 2024

To clarify, you're suggesting we move from using CSS files to applying styles to components using the MUI styled() function? Thoughts, @ordabach?

On the plus side, this should sidestep our issue with component tests failing due to the incompatibility with cypress and nextjs 13+.

Note: Styles are provided via the styles parameter, and look like:

{
  width: 300,
  color: theme.palette.success.main,
  '& .MuiSlider-thumb': {
    '&:hover, &.Mui-focusVisible': {
      boxShadow: `0px 0px 0px 8px ${alpha(theme.palette.success.main, 0.16)}`,
    },
    '&.Mui-active': {
      boxShadow: `0px 0px 0px 14px ${alpha(theme.palette.success.main, 0.16)}`,
    },
  },
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Refactor UI:refactoring Issues related to refactoring to next.js
Projects
None yet
Development

No branches or pull requests

2 participants