File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
packages/material-ui/src/styles Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,14 @@ export default function createPalette(palette) {
119
119
120
120
if ( process . env . NODE_ENV !== 'production' ) {
121
121
const contrast = getContrastRatio ( background , contrastText ) ;
122
- if ( process . env . NODE_ENV !== 'production' ) {
123
- if ( contrast < 3 ) {
124
- console . error (
125
- [
126
- `Material-UI: the contrast ratio of ${ contrast } :1 for ${ contrastText } on ${ background } ` ,
127
- 'falls below the WACG recommended absolute minimum contrast ratio of 3:1.' ,
128
- 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast' ,
129
- ] . join ( '\n' ) ,
130
- ) ;
131
- }
122
+ if ( contrast < 3 ) {
123
+ console . error (
124
+ [
125
+ `Material-UI: the contrast ratio of ${ contrast } :1 for ${ contrastText } on ${ background } ` ,
126
+ 'falls below the WACG recommended absolute minimum contrast ratio of 3:1.' ,
127
+ 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast' ,
128
+ ] . join ( '\n' ) ,
129
+ ) ;
132
130
}
133
131
}
134
132
You can’t perform that action at this time.
0 commit comments