Skip to content

Commit

Permalink
use overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Jul 29, 2020
1 parent 0bfbb6b commit 843d1e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 0 additions & 3 deletions docs/src/modules/components/ThemeContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ export function ThemeProvider(props) {
main: paletteType === 'light' ? darken(pink.A400, 0.1) : pink[200],
},
type: paletteType,
background: {
default: paletteType === 'light' ? '#fff' : '#121212',
},
...paletteColors,
},
spacing,
Expand Down
11 changes: 10 additions & 1 deletion packages/material-ui/src/Paper/Paper.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ export const styles = (theme) => {
const overlays = {};
theme.shadows.forEach((_, index) => {
overlays[`overlay${index}`] = {
backgroundColor: fade(theme.palette.background.paper, calculateAlpha(index)),
'&:before': {
content: '""',
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
background: fade('#fff', calculateAlpha(index)),
},
};
});

Expand All @@ -38,6 +46,7 @@ export const styles = (theme) => {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
transition: theme.transitions.create('box-shadow'),
position: 'relative',
},
/* Styles applied to the root element if `square={false}`. */
rounded: {
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/styles/createPalette.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const light = {
// Consistency between these values is important.
background: {
paper: common.white,
default: grey[50],
default: common.white,
},
// The colors used to style the action elements.
action: {
Expand Down Expand Up @@ -61,8 +61,8 @@ export const dark = {
},
divider: 'rgba(255, 255, 255, 0.12)',
background: {
paper: grey[800],
default: '#303030',
paper: '#121212',
default: '#121212',
},
action: {
active: common.white,
Expand Down

0 comments on commit 843d1e0

Please sign in to comment.