Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions packages/material-ui-lab/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export const styles = theme => {

const colors = {
primary: theme.palette.primary.main,
secondary: theme.palette.grey[400],
focused: theme.palette.grey[500],
disabled: theme.palette.grey[400],
};

Expand Down Expand Up @@ -63,37 +61,30 @@ export const styles = theme => {
transform: 'translate(0, -50%)',
top: '50%',
height: 2,
backgroundColor: colors.primary,
'&$focused, &$activated': {
transition: 'none',
backgroundColor: colors.focused,
},
'&$disabled': {
backgroundColor: colors.secondary,
backgroundColor: colors.disabled,
},
'&$vertical': {
transform: 'translate(-50%, 0)',
left: '50%',
top: 'initial',
width: 2,
},
'&$jumped': {
backgroundColor: colors.focused,
},
},
/* Styles applied to the track element before the thumb. */
trackBefore: {
zIndex: 1,
left: 0,
backgroundColor: colors.primary,
transition: commonTransitions,
'&$focused, &$activated, &$jumped': {
backgroundColor: colors.primary,
},
},
/* Styles applied to the track element after the thumb. */
trackAfter: {
right: 0,
backgroundColor: colors.secondary,
opacity: 0.24,
transition: commonTransitions,
'&$vertical': {
bottom: 0,
Expand Down Expand Up @@ -128,12 +119,12 @@ export const styles = theme => {
backgroundColor: 'transparent',
},
'&$focused$zero': {
border: `2px solid ${colors.focused}`,
backgroundColor: fade(colors.focused, 0.34),
boxShadow: `0px 0px 0px 9px ${fade(colors.focused, 0.34)}`,
border: `2px solid ${colors.primary}`,
backgroundColor: fade(colors.primary, 0.34),
boxShadow: `0px 0px 0px 9px ${fade(colors.primary, 0.34)}`,
},
'&$activated$zero': {
border: `2px solid ${colors.focused}`,
border: `2px solid ${colors.primary}`,
},
'&$jumped': {
width: 17,
Expand Down