[Input] custom padding alignment issue in IE11
See original GitHub issueFound a strange issue when trying to use Chakra UI in an app that targets IE11. If you put custom padding on an Input
, it will start with the input text aligned to the bottom of the input. Clicking it will then cause it to jump. I think it has something to do with line-height
but I haven’t been able to narrow it down exactly.
Demo:
Here’s the entire code for that:
function App() {
return (
<ThemeProvider>
<CSSReset />
<Box p={4}>
<Text mb={4}>Custom padding:</Text>
<Input autoFocus p={2} />
<Text my={4}>Default padding:</Text>
<Input />
</Box>
</ThemeProvider>
);
}
And here it is deployed (make sure to use IE11 - it works fine in other browsers):
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Padding of Text Input in Internet Explorer 11 does not work as ...
The problem with this: The input field has to have 34 pixels (22 input field (line-height) + 5x2 margin + 1x2 border). This...
Read more >IE 11 issues - Support - Themeco Forum
To fix the custom headline accent issue, add the following code in the Theme Options > CSS: .accent-2 { text-align: left; }. The...
Read more >15 ways to implement vertical alignment with CSS
Learn 15 ways to implement vertical alignment for text with CSS, such as explicit grid row placement and pseudo-elements on flex containers.
Read more >::placeholder | CSS-Tricks - CSS-Tricks
:placeholder-shown, being a pseudo-class, has to select an existing element – it selects the input whenever you're in the placeholder-showing ...
Read more >text-underline-offset - CSS: Cascading Style Sheets | MDN
... if there are child elements with different font sizes or vertical alignment. ... Report problems with this compatibility data on GitHub ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Such dedication to seeing this resolved!
Sorry for the stale spam. I’ll open a PR soon to prevent this from being tagged again.
Sorry Justin! We’re actually going to close this because we’re focusing on the 1.0 future. We haven’t touched pre-1.0 in quite some time and don’t plan on any further releases unless there are vulnerabilities we need to fix.
See https://next.chakra-ui.com/ for more info on 1.0, which will be out asap!