question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

[StepIcon] Cannot override active color

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior šŸ˜Æ

Hey,

Iā€™m currently trying to override the StepIcon active color at theme level, following the examples Iā€™ve found in the documentation, but itā€™s not working for me. Overriding the styles for the text in the StepIcon is working though.

Thank you for you help.

Expected behavior šŸ¤”

Iā€™m expecting the color of the active step icon to change to red.

Steps to reproduce šŸ•¹

Steps:

  1. Go to https://codesandbox.io/s/stepiconcolor-dixvx
  2. There, Iā€™ve tried to change the color of the icon in 2 ways, but none of them works.

Context šŸ”¦

Iā€™m trying to migrate a theme from v4 to v5.

Your environment šŸŒŽ

`npx @mui/envinfo`
 System:
    OS: Windows 10 10.0.19042
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD  
    npm: 6.14.10 - C:\Program Files\nodejs\npm.CMD  
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53)
  npmPackages:
    @emotion/react: ^11.6.0 => 11.6.0
    @emotion/styled: ^11.6.0 => 11.6.0
    @mui/base:  5.0.0-alpha.55
    @mui/icons-material: ^5.1.1 => 5.1.1
    @mui/lab: ^5.0.0-alpha.55 => 5.0.0-alpha.55
    @mui/material: ^5.1.1 => 5.1.1
    @mui/private-theming:  5.1.1
    @mui/styled-engine:  5.1.1
    @mui/styles: ^5.1.1 => 5.1.1
    @mui/system:  5.1.1
    @mui/types:  7.1.0
    @mui/utils:  5.1.1
    @types/react:  17.0.35
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
michaldudakcommented, Nov 29, 2021

Thanks for pointing this out, @abrezuica! Iā€™ve just prepared a PR with a fix.

0reactions
abrezuicacommented, Nov 23, 2021

There shouldnā€™t be a space between & and class name ā€¦ On Tue, 23 Nov, 2021, 17:19 Adela, @.***> wrote: Change ā€œ& .MuiStepIcon-activeā€ to ā€œ&.Mui-activeā€ in L11 of your sandbox it still doesnā€™t work ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub <#29825 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4VUQF23EYP2ME7NA5R44LUNO5I5ANCNFSM5IQIRNLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Omg, thanks a lot. Iā€™ve tried it without the space but not in this combination it seems. However, I wouldnā€™t close this issue for the moment, since I think the documentation for StepIcon global classnames should be updated?

Read more comments on GitHub >

github_iconTop Results From Across the Web

mui/material-ui - [StepIcon] Cannot override active color - GitHub
Hey,. I'm currently trying to override the StepIcon active color at theme level, following the examples I've found in the documentation, butĀ ...
Read more >
Unable to update stepper active icon color for material ui
I'm using react material ui and having issues changing the color for the following highlight class. enter image description here. CSS stepIcon:Ā ...
Read more >
How to change the Stepper colors in Material-UI React
The color of the stepper bullets can't be changed using any props directly. We can change it by using a theme. In this...
Read more >
StepIcon API - Material UI - MUI
Override or extend the styles applied to the component. See CSS API below for more details. completed, bool, false. Mark the step as...
Read more >
React MUI StepIcon API - GeeksforGeeks
sx (Array<func/object/bool> func/object): The system prop allows defining system overrides as well as additional CSS styles. active (bool): IfĀ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found