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.

Typography does not support color "success"

See original GitHub issue

General summary I would like to be able to set the color props for the Typography element to “success”, this code does not color the text color Current Behavior 😯 The Typography component does not have a color props with the “success” value Expected Behavior 🤔 I would like to be able to set the color props to “success” and for this to work correctly Steps to Reproduce 🕹

  1. Create CRA with Typography with color = “success” props

Sandbox issue here Context 🔦 I want to get the “success” text color of Typography in a short way without creating unnecessary entities My Environment 🌎

  System:
    OS: Linux 5.4 Linux Mint 20.1 (Ulyssa)
  Binaries:
    Node: 14.18.0 - /usr/bin/node
    Yarn: 1.22.10 - /usr/bin/yarn
    npm: 6.14.15 - /usr/bin/npm
  Browsers:
    Chrome: 94.0.4606.81
    Firefox: 93.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

17reactions
paulintrognoncommented, Apr 5, 2022

It is inconsistent with the icons, which has got me very frustrated today. I thought I wasn’t using the API right, it got me wasting time experimenting with the MuiTheme before I figured out that Typography and Icons behave differently:

  • <Circle color="success" /> works ✔️
  • <Circle color="success.main" /> fails ❌
  • <Typography color="success" /> fails ❌
  • <Typography color="success.main" /> works ✔️

So while I agree it is non essential, it is kinda annoying.

5reactions
RemyMachadocommented, Jan 21, 2022

It’s a bit tricky. primary & secondary works without .main, but the other colors in the palette don’t.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typography does not support color "success" #29564 - GitHub
General summary I would like to be able to set the color props for the Typography element to "success", this code does not...
Read more >
Material-ui does not change Typography color according to ...
The default behavior for Typography is to do nothing with color. The reason for this is that generally the color is controlled by...
Read more >
Global Fonts and Global Colors Not Working After Update
Following the latest update, global fonts and global colors no longer work correctly. It was fine before. Now it just reverts to standard...
Read more >
Colour and typography - A Practical Guide to Web App Success
Professional designers often allow one complementary colour to dominate, for example as a background colour, to maximise the contrast with the accent colour....
Read more >
Understanding Success Criterion 1.4.3: Contrast (Minimum)
People with low vision often have difficulty reading text that does not contrast with its background. This can be exacerbated if the person...
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