Skip to content

button css wrong when i use css varibles #43540

@hhniao

Description

@hhniao

Steps to reproduce

the outlined button hover style wrong
https://codesandbox.io/p/sandbox/reverent-babbage-66yztk

const theme = createTheme({
  cssVariables: {
    colorSchemeSelector: ".demo-disable-transition-%s",
  },
  palette: {
    mode: "light",
    primary: {
      light: "var(--primary-light)",
      main: "var(--primary)",
      dark: "var(--primary-hover)",
      contrastText: "var(--primary-foreground)",

      // light: "#338cf5",
      // main: "#0070f3",
      // dark: "#004eaa",
      // contrastText: "#ffffff",
    },
  },
  colorSchemes: { dark: true },
});

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

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

Search keywords: css varibles button hover

Metadata

Metadata

Assignees

Labels

customization: themeHigher level theming customizability.scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUI

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions