- I am trying to learn material ui.
- I am trying to change the css of the loading bar.
- I referred to the documentation and used colorPrimary classes
- but its not changing.
- can you tell me how to fix it so taht in future I will fix it myself
- providing my code snippet below.
- all my code is in ReceipeReviewCardList.js
https://codesandbox.io/s/2zonj08v5r
const styles = {
root: {
flexGrow: 1
},
colorPrimary: {
color: "green"
}
};
render() {
const { classes } = this.props;
return (
<div className={classes.root}>
<LinearProgress
className={classes.colorPrimary}
variant="determinate"
value={this.state.completed}
!important
as much as possible, ideally not using it at all. MUI exposes a CSS class structure you can access to modify the styles of any component without having to incur in using!important
. If that weren't the case, you can still use CSS specificity to override a class -- which is why you don't want to use "!important" in the first place, because it messes up with the specificity. – Osmosis