Is there anyway to override the following style?
label + .MuiInput-formControl-21 {
margin-top: 16px;
}
I tried overriding it with:
MuiInput: {
formControl: {
marginTop: '0px'
}
}
But 'label + .MuiInput-formControl-21' style will always override my override.
Is there anyway to add the 'label +' part of the css into my theme object?
I read through the JSS docs, and tried doing this with no luck:
'label + MuiInput': {
formControl: {
marginTop: '0px'
}
}
Not quite sure where the element+element selector should go.
I am trying to put the label inside of the form field while maintaining effects, and this is the only style that's left for me to change in order to do that.
| Tech | Version |
|--------------|---------|
| Material-UI | 1.0.0-beta.43 |
| React | 16.3 |
| browser | Chrome 65.0.3325.181 |
馃憢 Thanks for using Material-UI!
We use the issue tracker exclusively for bug reports and feature requests, however,
this issue appears to be a support request or question. Please ask on StackOverflow where the
community will do their best to help. There is a "material-ui" tag that you can use to tag your
question.
If you would like to link from here to your question on SO, it will help others find it.
If your issues is confirmed as a bug, you are welcome to reopen the issue using the issue template.
@racingrebel tips, the style comes from:
https://github.com/mui-org/material-ui/blob/0bba4ad1aed5d2181baa156009301eb56fd80158/packages/material-ui/src/Input/Input.js#L72-L76
Fantastic, thank you so much for replying quickly!
Solved with the following:
MuiInput: {
formControl: {
'label + &': {
marginTop: '0px'
}
}
}
Most helpful comment
@racingrebel tips, the style comes from:
https://github.com/mui-org/material-ui/blob/0bba4ad1aed5d2181baa156009301eb56fd80158/packages/material-ui/src/Input/Input.js#L72-L76