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

[joy-ui] How to customize the JoyBreadcrumbs item color #43570

Closed
rick-liyue-huang opened this issue Sep 1, 2024 · 2 comments
Closed

[joy-ui] How to customize the JoyBreadcrumbs item color #43570

rick-liyue-huang opened this issue Sep 1, 2024 · 2 comments
Assignees
Labels
customization: theme Centered around the theming features package: joy-ui Specific to @mui/joy status: waiting for author Issue with insufficient information support: question Community support but can be turned into an improvement

Comments

@rick-liyue-huang
Copy link

rick-liyue-huang commented Sep 1, 2024

Steps to reproduce

Link to live example: (required)

Steps:

  1. I'm now hoping to customize the JoyBreadcrumbs item color;
  2. I try to use codes like the following content:
export const raulandAdvancedThemes = extendTheme({
    cssVarPrefix: 'test',
    colorSchemes,
    radius,
    typography,
    fontFamily,
    breakpoints,
    components: {
        JoyBreadcrumbs: {
            styleOverrides: {
                root: ({ theme, ownerState }) => ({
                    // color: 'var(--rauland-palette-illustrate-300)',
                    '& .MuiBreadcrumbs-separator': {
                        color: 'var(--rauland-palette-illustrate-300)',
                    },
                    '& .MuiBreadcrumbs-li': {
                        backgroundColor: 'white',
                        color: 'red', 
                    },
                    backgroundColor: 'var(--rauland-palette-illustrate-100)',
                    '&:hover': {
                        color: 'var(--rauland-palette-illustrate-50)',
                        backgroundColor: 'var(--rauland-palette-illustrate-200)',
                    },
                    '&:active': {
                        color: 'var(--rauland-palette-illustrate-50)',
                        backgroundColor: 'var(--rauland-palette-illustrate-200)',
                    },
                    [`&.${linkClasses.disabled}`]: {
                        color: 'var(--rauland-palette-neutral-300)',
                    },
                }),
            },
        },
    },
})
  1. I found that '& .MuiBreadcrumbs-li': { backgroundColor: 'white', color: 'red', } color: 'red' is not woking properly

Current behavior

the '& .MuiBreadcrumbs-li': {
backgroundColor: 'white',
color: 'red',
} color: 'red' not work properly

Expected behavior

hope that the items in the Breadcrumbs Show items with red color

Context

react 18, vite,

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: JoyBreadcrumbs, customize, .MuiBreadcrumbs-li
Order ID: 97037

Search keywords:

@rick-liyue-huang rick-liyue-huang added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 1, 2024
@michelengelen michelengelen added support: question Community support but can be turned into an improvement and removed bug 🐛 Something doesn't work labels Sep 2, 2024
@michelengelen michelengelen transferred this issue from mui/mui-x Sep 2, 2024
@michelengelen michelengelen added the package: joy-ui Specific to @mui/joy label Sep 2, 2024
@michelengelen michelengelen changed the title How to customize the JoyBreadcrumbs item color, [joy-ui] How to customize the JoyBreadcrumbs item color Sep 2, 2024
@siriwatknp
Copy link
Member

@rick-liyue-huang Can you provide a reproducible CodeSandbox?

@siriwatknp siriwatknp added status: waiting for author Issue with insufficient information customization: css Design CSS customizability customization: theme Centered around the theming features and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer customization: css Design CSS customizability labels Sep 11, 2024
Copy link

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features package: joy-ui Specific to @mui/joy status: waiting for author Issue with insufficient information support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

3 participants