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] Fix transition of tooltips on vertical slider #33009

Merged
merged 7 commits into from
Jul 18, 2022
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
2 changes: 1 addition & 1 deletion docs/src/components/showcase/ThemeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function ThemeSlider() {
color: mode === 'dark' ? grey[50] : grey[500],
fontWeight: 700,
padding: 0,
left: '1rem',
left: '2rem',
'&.MuiSlider-valueLabelOpen': {
transform: 'none',
top: 'initial',
Expand Down
5 changes: 3 additions & 2 deletions packages/mui-material/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
transition: theme.transitions.create(['transform'], {
duration: theme.transitions.duration.shortest,
}),
transformOrigin: 'bottom center',
transform: 'translateY(-100%) scale(0)',
position: 'absolute',
backgroundColor: theme.palette.grey[600],
Expand All @@ -321,6 +320,7 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
padding: '0.25rem 0.75rem',
...(ownerState.orientation === 'horizontal' && {
top: '-10px',
transformOrigin: 'bottom center',
'&:before': {
position: 'absolute',
content: '""',
Expand All @@ -334,7 +334,8 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
}),
...(ownerState.orientation === 'vertical' && {
right: '30px',
top: '25px',
top: '24px',
transformOrigin: 'right center',
'&:before': {
position: 'absolute',
content: '""',
Expand Down