From 017c1f923dc2f404a315ca69224d94c923815f82 Mon Sep 17 00:00:00 2001 From: coktopus <63889078+coktopus@users.noreply.github.com> Date: Sat, 25 Apr 2020 08:28:32 +0530 Subject: [PATCH 1/3] 'slider-switch-linnerProgress' --- packages/material-ui/src/LinearProgress/LinearProgress.js | 3 +++ packages/material-ui/src/Slider/Slider.js | 3 +++ packages/material-ui/src/Switch/Switch.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/packages/material-ui/src/LinearProgress/LinearProgress.js b/packages/material-ui/src/LinearProgress/LinearProgress.js index 130423d787cf7e..ceea5f4d3c4557 100644 --- a/packages/material-ui/src/LinearProgress/LinearProgress.js +++ b/packages/material-ui/src/LinearProgress/LinearProgress.js @@ -21,6 +21,9 @@ export const styles = (theme) => { position: 'relative', overflow: 'hidden', height: 4, + // '@media print': { + // WebkitPrintColorAdjust: 'exact', + // }, }, /* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */ colorPrimary: { diff --git a/packages/material-ui/src/Slider/Slider.js b/packages/material-ui/src/Slider/Slider.js index 9379e1874586d5..e74f51906757fa 100644 --- a/packages/material-ui/src/Slider/Slider.js +++ b/packages/material-ui/src/Slider/Slider.js @@ -156,6 +156,9 @@ export const styles = (theme) => ({ padding: '0 20px', }, }, + '@media print': { + WebkitPrintColorAdjust: 'exact', + }, }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { diff --git a/packages/material-ui/src/Switch/Switch.js b/packages/material-ui/src/Switch/Switch.js index 49b4a71f5f4830..692449aa35b95c 100644 --- a/packages/material-ui/src/Switch/Switch.js +++ b/packages/material-ui/src/Switch/Switch.js @@ -22,6 +22,9 @@ export const styles = (theme) => ({ flexShrink: 0, zIndex: 0, // Reset the stacking context. verticalAlign: 'middle', // For correct alignment with the text. + '@media print': { + WebkitPrintColorAdjust: 'exact', + }, }, /* Styles applied to the root element if `edge="start"`. */ edgeStart: { From 03f1d8e7f244de66c564f47f92116902b751f303 Mon Sep 17 00:00:00 2001 From: coktopus <63889078+coktopus@users.noreply.github.com> Date: Sat, 25 Apr 2020 08:32:01 +0530 Subject: [PATCH 2/3] 'button-base' --- packages/material-ui/src/ButtonBase/ButtonBase.js | 3 +++ packages/material-ui/src/LinearProgress/LinearProgress.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/material-ui/src/ButtonBase/ButtonBase.js b/packages/material-ui/src/ButtonBase/ButtonBase.js index 060a21543f17ef..7b47637f7848bb 100644 --- a/packages/material-ui/src/ButtonBase/ButtonBase.js +++ b/packages/material-ui/src/ButtonBase/ButtonBase.js @@ -39,6 +39,9 @@ export const styles = { pointerEvents: 'none', // Disable link interactions cursor: 'default', }, + '@media print': { + WebkitPrintColorAdjust: 'exact', + }, }, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, diff --git a/packages/material-ui/src/LinearProgress/LinearProgress.js b/packages/material-ui/src/LinearProgress/LinearProgress.js index ceea5f4d3c4557..a3b0e6b943c6be 100644 --- a/packages/material-ui/src/LinearProgress/LinearProgress.js +++ b/packages/material-ui/src/LinearProgress/LinearProgress.js @@ -21,9 +21,9 @@ export const styles = (theme) => { position: 'relative', overflow: 'hidden', height: 4, - // '@media print': { - // WebkitPrintColorAdjust: 'exact', - // }, + '@media print': { + WebkitPrintColorAdjust: 'exact', + }, }, /* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */ colorPrimary: { From 2904d89dd79a6b9899a5353b7786380f20a73f8c Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sun, 26 Apr 2020 09:43:51 +0200 Subject: [PATCH 3/3] fix: Fix missing color in firefox --- packages/material-ui/src/ButtonBase/ButtonBase.js | 2 +- packages/material-ui/src/LinearProgress/LinearProgress.js | 2 +- packages/material-ui/src/Slider/Slider.js | 2 +- packages/material-ui/src/Switch/Switch.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/material-ui/src/ButtonBase/ButtonBase.js b/packages/material-ui/src/ButtonBase/ButtonBase.js index 7b47637f7848bb..dca1dc56e44cd7 100644 --- a/packages/material-ui/src/ButtonBase/ButtonBase.js +++ b/packages/material-ui/src/ButtonBase/ButtonBase.js @@ -40,7 +40,7 @@ export const styles = { cursor: 'default', }, '@media print': { - WebkitPrintColorAdjust: 'exact', + colorAdjust: 'exact', }, }, /* Pseudo-class applied to the root element if `disabled={true}`. */ diff --git a/packages/material-ui/src/LinearProgress/LinearProgress.js b/packages/material-ui/src/LinearProgress/LinearProgress.js index a3b0e6b943c6be..bd4a97865bc576 100644 --- a/packages/material-ui/src/LinearProgress/LinearProgress.js +++ b/packages/material-ui/src/LinearProgress/LinearProgress.js @@ -22,7 +22,7 @@ export const styles = (theme) => { overflow: 'hidden', height: 4, '@media print': { - WebkitPrintColorAdjust: 'exact', + colorAdjust: 'exact', }, }, /* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */ diff --git a/packages/material-ui/src/Slider/Slider.js b/packages/material-ui/src/Slider/Slider.js index e74f51906757fa..1bef3c19eb4945 100644 --- a/packages/material-ui/src/Slider/Slider.js +++ b/packages/material-ui/src/Slider/Slider.js @@ -157,7 +157,7 @@ export const styles = (theme) => ({ }, }, '@media print': { - WebkitPrintColorAdjust: 'exact', + colorAdjust: 'exact', }, }, /* Styles applied to the root element if `color="primary"`. */ diff --git a/packages/material-ui/src/Switch/Switch.js b/packages/material-ui/src/Switch/Switch.js index 692449aa35b95c..64fea496653c0a 100644 --- a/packages/material-ui/src/Switch/Switch.js +++ b/packages/material-ui/src/Switch/Switch.js @@ -23,7 +23,7 @@ export const styles = (theme) => ({ zIndex: 0, // Reset the stacking context. verticalAlign: 'middle', // For correct alignment with the text. '@media print': { - WebkitPrintColorAdjust: 'exact', + colorAdjust: 'exact', }, }, /* Styles applied to the root element if `edge="start"`. */