Skip to content

Commit 480fa73

Browse files
authored
[core] Force visibility on a few components in ink save print mode (#20749)
1 parent ea04c3a commit 480fa73

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

packages/material-ui/src/ButtonBase/ButtonBase.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export const styles = {
3939
pointerEvents: 'none', // Disable link interactions
4040
cursor: 'default',
4141
},
42+
'@media print': {
43+
colorAdjust: 'exact',
44+
},
4245
},
4346
/* Pseudo-class applied to the root element if `disabled={true}`. */
4447
disabled: {},

packages/material-ui/src/LinearProgress/LinearProgress.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export const styles = (theme) => {
2121
position: 'relative',
2222
overflow: 'hidden',
2323
height: 4,
24+
'@media print': {
25+
colorAdjust: 'exact',
26+
},
2427
},
2528
/* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */
2629
colorPrimary: {

packages/material-ui/src/Slider/Slider.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ export const styles = (theme) => ({
156156
padding: '0 20px',
157157
},
158158
},
159+
'@media print': {
160+
colorAdjust: 'exact',
161+
},
159162
},
160163
/* Styles applied to the root element if `color="primary"`. */
161164
colorPrimary: {

packages/material-ui/src/Switch/Switch.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export const styles = (theme) => ({
2222
flexShrink: 0,
2323
zIndex: 0, // Reset the stacking context.
2424
verticalAlign: 'middle', // For correct alignment with the text.
25+
'@media print': {
26+
colorAdjust: 'exact',
27+
},
2528
},
2629
/* Styles applied to the root element if `edge="start"`. */
2730
edgeStart: {

0 commit comments

Comments
 (0)