Skip to content

Commit

Permalink
Increase scaled-down label width to match 100% input width
Browse files Browse the repository at this point in the history
Input label is shrunk using CSS `scale`. The 100% default width is
becoming smaller than full input width. Increasing accordingly the
shrunk input label `width` let it occupy as much space as possible,
avoiding in some case the wrapping of text, which is very inelegant in
this component.
  • Loading branch information
pandaiolo committed May 2, 2018
1 parent 2726ab4 commit 232f0a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/material-ui/src/Input/InputLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const styles = theme => ({
shrink: {
transform: 'translate(0, 1.5px) scale(0.75)',
transformOrigin: 'top left',
width: `${100 * 4 / 3}%`,
},
animated: {
transition: theme.transitions.create('transform', {
Expand Down

0 comments on commit 232f0a9

Please sign in to comment.