[va-text-input] Add z-index to input field and symbol#2018
Conversation
Found a tiny css bug on the currency prop for the `va-text-input`. When you click on the input, the symbol disappears because of a `z-index` issue. Since the input has background: white on it, the $ symbol disappears. If the z-index gets applied the `.currency-wrapper #symbol` then, it shows up.
amyleadem
left a comment
There was a problem hiding this comment.
Thanks for this contribution, @josephrlee!
After digging into this issue a little bit, I noticed that it was likely related to the the addition of a z-index to global focus styles in focusable.css. If I remove that z-index, it fixes the issue in input prefix/suffix. I'm wondering if instead of adding z-index definitions in this component, if we can just strip the global z-index in focusable.css.
@jamigibbs, I see that the focusable.css z-index was added with the sidenav component. do you remember why that was added there? I am having trouble seeing the change in the side nav when I remove it. Can we scope that focusable.css z-index change to be more targeted to side nav (or removed entirely)? Then we wouldn't have to continue manipulating z-index across components.
|
Thanks @amyleadem , I'll let you and @jamigibbs decide on the best route here then! |
@amyleadem The z-index fixed an overlay issue where the yellow focus border was sitting behind the submenu's left border. It can be tested in this Storybook story. Perhaps we can just bring those styles into the va-sidenav component and remove the z-index from the global styles? z-index: 2
No z-index
|


Chromatic
https://currency-symbol-fix--65a6e2ed2314f7b8f98609d8.chromatic.com
Description
This pull request makes a minor update to the styling of the
va-text-inputcomponent to improve element stacking order. Specifically, it addsz-indexvalues to ensure that the#symboland#inputFieldelements layer correctly.z-index: 2to#symbolandz-index: 1to#inputFieldinva-text-input.scssto control their stacking order.Related tickets and links
Slack thread
#5346
Closes
Screenshots
Testing and review
Approvals
See the QA Checklists section below for suggested approvals. Use your best judgment if additional reviews are needed. When in doubt, request a review.
Approval groups
Add approval groups to the PR as needed:
QA checklists
Use the QA checklists below as guides, not rules. Not all checklists will apply to every PR but there could be some overlap.
In all scenarios, changes should be fully tested by the author and verified by the reviewer(s); functionality, responsiveness, etc.
✨ New Component Added
minorlabel🌱 New Component Variation Added
minorlabel🐞 Component Fix
patchlabel♿️ Component Fix - Accessibility
patchlabel🚨 Component Fix - Breaking API Change
majorlabel🔧 Component Update - Non-Breaking API Change
minorlabel📖 Storybook Update
ignore-for-releaselabel🎨 CSS-Library Update
css-librarylabel