question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tachyons & TextField with type="password"

See original GitHub issue

When you have a TextField with type="password", the presence of a global CSS rule input[type="password"] { box-sizing: border-box; } will screw up rendering. The placeholder text renders lower than it should, so the line at the bottom of the text field passes through the text.

This seems to only happen for type="password" and not for other TextField types.

I noticed this because tachyons includes a global rule like this which causes the problem.

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The TextField should render properly.

Current Behavior

The placeholder text renders too low.

Steps to Reproduce

https://codesandbox.io/s/github/thomasjm/material-ui/tree/textfield-password-issue/examples/gatsby

(You can see I just used react-helmet to stick the problematic CSS rule into the Gatsby example page.)

Context

I gather from #4422 that material-ui is supposed to gracefully handle either border-box or content-box. In this case it doesn’t, which causes a lot of confusion when trying to mix material-ui with tachyons.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thomasjmcommented, Jul 1, 2019

Note: I just upgraded to Material UI v4 and now it seems this problem applies to input[type="text"] as well.

1reaction
oliviertassinaricommented, Oct 1, 2018

I gather from #4422 that material-ui is supposed to gracefully handle either border-box or content-box.

@thomasjm We do, we are allowing people to use content box or border box for their pages. However, in your case, you are explicitly overriding the Material-UI safeguard, it can’t work. Change the style injection order or remove this stye, or override a second time the style.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tachyons & TextField with type="password" #13053 - GitHub
When you have a TextField with type="password", the presence of a global CSS rule input[type="password"] { box-sizing: border-box; } ...
Read more >
Forms | Password - Tachyons CSS
Password Must be 9 characters long and contain both a number and an uppercase character. Password. HTML. <form class ...
Read more >
tachyons-box-sizing - npm
Start using tachyons-box-sizing in your project by running `npm i ... dd, blockquote, figcaption, figure, textarea, input[type="email"],.
Read more >
Forms - Tachyons Templates
<input className="b pa2 input-reset ba bg-transparent hover-bg-black hover-white w-100" type="password" name="password" id="password"
Read more >
Tachyons.Classes - elm-tachyons 1.0.0 - Elm Packages
Yes these docs are useless, please look at Tachyons Table of Styles for the ... ,input[type=email],input[type=number],input[type=password],input[type=tel] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found