From 232f0a99ea6152b1bc945f29fe72ae9b44555be6 Mon Sep 17 00:00:00 2001 From: Pandaiolo Date: Wed, 2 May 2018 17:07:23 +0100 Subject: [PATCH] Increase scaled-down label width to match 100% input width 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. --- packages/material-ui/src/Input/InputLabel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/material-ui/src/Input/InputLabel.js b/packages/material-ui/src/Input/InputLabel.js index cdbac3c157c42c..ac4f722235277d 100644 --- a/packages/material-ui/src/Input/InputLabel.js +++ b/packages/material-ui/src/Input/InputLabel.js @@ -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', {