-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[TextField/FormControl] dense implementation #7364
Conversation
…l `input` classes
@@ -104,6 +104,9 @@ export const styleSheet = createStyleSheet('MuiInput', theme => { | |||
'&:focus::-ms-input-placeholder': placeholderFormFocus, // Edge | |||
}, | |||
}, | |||
inputDense: { | |||
paddingTop: `${theme.spacing.unit / 2}px 0`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the bug I referred to, just paddingTop adjustment.
import React from 'react'; | ||
import TextField from 'material-ui/TextField'; | ||
|
||
export default function TextFieldMargin() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we need that regression test as we are also taking into account the demo of the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, forgot about those accounting for regressions!
Closes #7358
The previous approach was using
marginForm
to implement what the spec callednormal
spacing, whereas the default was to omit the margins.dense
by spec is more than our defaultnone
, but less than specnormal
.Breaking change removes
marginForm
and replaces it withmargin: 'none' | 'dense' | 'normal'
, where the default ofnone
is unchanged.Also: