Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Slider] Remove visual zero state from thumb #12242

Merged
merged 3 commits into from
Jul 25, 2018
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion packages/material-ui-lab/src/Slider/Slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type SliderClassKey =
| 'focused'
| 'activated'
| 'disabled'
| 'zero'
| 'vertical'
| 'reverse'
| 'jumped';
Expand Down
18 changes: 1 addition & 17 deletions packages/material-ui-lab/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,6 @@ export const styles = theme => {
height: 9,
backgroundColor: colors.disabled,
},
'&$zero': {
border: `2px solid ${colors.disabled}`,
backgroundColor: 'transparent',
},
'&$focused$zero': {
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.primary}`,
},
'&$jumped': {
width: 17,
height: 17,
Expand All @@ -143,8 +131,6 @@ export const styles = theme => {
activated: {},
/* Class applied to the root, track and container to trigger JSS nested styles if `vertical`. */
vertical: {},
/* Class applied to the thumb to trigger nested styles if `value` = `min` . */
zero: {},
};
};

Expand Down Expand Up @@ -440,9 +426,7 @@ class Slider extends React.Component {
[classes.vertical]: vertical,
});

const thumbClasses = classNames(classes.thumb, commonClasses, {
[classes.zero]: percent === 0,
});
const thumbClasses = classNames(classes.thumb, commonClasses);

const trackProperty = vertical ? 'height' : 'width';
const thumbProperty = vertical ? 'top' : 'left';
Expand Down
1 change: 0 additions & 1 deletion pages/lab/api/slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ This property accepts the following keys:
| <span class="prop-name">focused</span> | Class applied to the track and thumb elements to trigger JSS nested styles if `focused`.
| <span class="prop-name">activated</span> | Class applied to the track and thumb elements to trigger JSS nested styles if `activated`.
| <span class="prop-name">vertical</span> | Class applied to the root, track and container to trigger JSS nested styles if `vertical`.
| <span class="prop-name">zero</span> | Class applied to the thumb to trigger nested styles if `value` = `min` .

Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/master/packages/material-ui-lab/src/Slider/Slider.js)
Expand Down