-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
scope: text fieldChanges related to the text field.Changes related to the text field.support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Similiar Issues:
Current Behavior π―
When overriding font size, the text does not align correctly.
Expected Behavior π€
Text should be in the center, there should be a prop accepting font size. Currently, it's using transformation to move the label upwards on click. The coordinates do not account for different font size.
Steps to Reproduce πΉ
Here's my following code:
const theme = createMuiTheme({
typography: {
fontFamily: 'Averta',
fontWeightRegular: 500,
},
overrides: {
MuiTextField: {
root: {
fontSize: '20px'
},
},
MuiInputLabel: {
shrink: {
fontSize: '20px',
},
root: {
fontSize: '20px',
},
}
});an example of such text field would look like:

As you can see, the text isn't aligned, it's meant to be aligned at 12px. To exaggerate the problem, look at the following:
It's even more obvious with larger fonts.
Context π¦
I'm trying to change the height of the textfield component so that it matches our figma height and it's font-size (56px in height) and 20px font size. I assume it's also a problem to align with just using inputbase and outlined input.
Your Environment π
| Tech | Version |
|---|---|
| Material-UI | v4.9.5 |
| React | 16.13.0 |
| Browser | chrome-latest |
| TypeScript | 3.8.3 |
mxrcochxvez and dan-pugsley
Metadata
Metadata
Assignees
Labels
scope: text fieldChanges related to the text field.Changes related to the text field.support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.
