When using Material-ui, the default position of Slider's labels is centered:
However, I require the labels to have a space-between position. For example:
To achieve this, I tried using the '&:last-child' property for the markLabel class as suggested in the documentation here.
This code snippet is intended to style only the markLabel but it does not affect '&:last-child':
const theme = createMuiTheme({
overrides: {
MuiSlider: {
markLabel: {
color: "red",
transform: "none",
"&:last-child": {
color: "green",
transform: "translateX(-100%)"
}
},
}
}
});
You can view and test the code on this SandBox link: