In Material UI, to extend the distance between MuiInputLabel
and MuiInput
, I have to override the marginTop of label + .MuiInput-formControl<
Here's the relevant JSS documentation:
https://cssinjs.org/jss-plugin-nested?v=v10.0.0-alpha.10#use--to-reference-selector-of-the-parent-rule
Here's the syntax you need:
const theme = createMuiTheme({
overrides: {
MuiInput: {
formControl: {
"label + &": {
marginTop: "1.5rem"
}
}
}
}
});
Here's a working example: