Skip to content

Commit

Permalink
Autocomplete styling and endAdornment styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
duganbrett committed Feb 15, 2021
1 parent 65797c9 commit 7137c95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions packages/material-ui/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,28 @@ const AutocompleteRoot = experimentalStyled(
padding: '2px 4px 3px 0',
},
},
'&[class*="MuiOutlinedInput-root"]': {
'&.MuiOutlinedInput-root': {
padding: 9,
[`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
paddingRight: 26 + 4 + 9,
},
[`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
paddingRight: 52 + 4 + 9,
},
[`& .${autocompleteClasses.input}`]: {
padding: '7.5px 4px 7.5px 6px',
'& .MuiOutlinedInput-input': {
padding: '7.5px 4px',
},
[`& .${autocompleteClasses.endAdornment}`]: {
'& .MuiOutlinedInput-input:first-child': {
paddingLeft: 6,
},
'& $endAdornment': {
right: 9,
},
},
'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-sizeSmall"]': {
'&.MuiOutlinedInput-root.MuiInputBase-sizeSmall': {
padding: 6,
[`& .${autocompleteClasses.input}`]: {
padding: '2.5px 4px 2.5px 6px',
'& .MuiOutlinedInput-input': {
padding: '2.5px 4px',
},
},
'&.MuiFilledInput-root': {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const OutlinedInputRoot = experimentalStyled(
...(styleProps.startAdornment && {
paddingLeft: 14,
}),
...(styleProps.startAdornment && {
...(styleProps.endAdornment && {
paddingRight: 14,
}),
...(styleProps.multiline && {
Expand Down

0 comments on commit 7137c95

Please sign in to comment.