update
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/* wrapper positions the toggle inside the input */
|
||||
.password-input-wrapper {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* add right padding so text doesn't overlap the icon */
|
||||
.password-input {
|
||||
padding-right: 2.25rem; /* adjust as needed for icon size */
|
||||
}
|
||||
|
||||
/* icon button sits absolutely inside the input at the right */
|
||||
.password-toggle-btn {
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* keep the native focus behavior but provide visible ring for keyboard users */
|
||||
.password-toggle-btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.password-toggle-btn:focus-visible {
|
||||
box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
/* tune icon size */
|
||||
.password-toggle-btn .mdi {
|
||||
font-size: 1.15rem;
|
||||
pointer-events: none; /* let clicks hit the button, not the icon */
|
||||
}
|
||||
Reference in New Issue
Block a user