fix(Input): transparent input padding off
See original GitHub issueSteps to Reproduce
- Include transparent prop in an
<Input />
component. The<Input />
text isn’t centered vertically as a normal<Input />
would be (relative). To understand more closely, put two<Input />
components next to one another and make one transparent and put text in both.
Expected
The vertical alignment should be the same for transparent vs non-transparent <Input />
components. The same goes with the text inside <Button />
etc. The text of a non-transparent input lines up with a button component’s text, but not a transparent input and button (or anything else for that matter).
Result The Input is not properly aligned.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Is there a pure CSS way to make an input transparent?
I set the opacity to 0. This made it disappear but still function when you click on it.
Read more >How to Remove and Style the Border Around Text Input Boxes ...
Remove the outline and add a border style using the :focus and :active pseudo-classes with the <input> field. Also, you can remove the...
Read more >background-clip - CSS: Cascading Style Sheets | MDN
The background-clip CSS property sets whether an element's background extends underneath its border box, padding box, or content box.
Read more >Input group - Bootstrap
Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs....
Read more >How To Adjust the Content, Padding, Border, and Margins of ...
You can try changing the values to study how they change the display of the element in the browser. Like with padding, you...
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
As this issue is CSS only, I close it. @brianespinosa thanks for replies 👍
@protzman It’s definitely intentional. There are separate variables in the library for defining the transparent inputs differently. The beauty of SUI proper is you can add themes globally or to individual elements if you prefer something else. If you want more direct answers on the design decisions, you’d have to ask there.