Skip to content

Commit 39bc013

Browse files
committed
style: improved password toggle button
1 parent 27b75e5 commit 39bc013

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

phpmyfaq/admin/assets/scss/_global.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,33 @@ body {
8585
color: var(--bs-gray-400);
8686
}
8787
}
88+
89+
// Improve visibility of input-group-text (e.g., password toggles)
90+
.input-group .input-group-text {
91+
background-color: var(--bs-gray-800);
92+
border-color: var(--bs-gray-700);
93+
color: var(--bs-light);
94+
}
95+
96+
// Specific styling for password toggle in dark mode
97+
#faqpassword_toggle {
98+
cursor: pointer;
99+
color: var(--bs-light);
100+
101+
&:hover {
102+
color: var(--bs-primary);
103+
background-color: rgba(var(--bs-primary-rgb), 0.1);
104+
}
105+
106+
.bi {
107+
color: currentColor;
108+
}
109+
}
110+
111+
// Focus state when focusing inputs within the group
112+
.input-group:focus-within .input-group-text {
113+
border-color: var(--bs-primary);
114+
color: var(--bs-primary);
115+
box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
116+
}
88117
}

phpmyfaq/assets/templates/admin/login.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
placeholder="{{ msgPassword }}" data-pmf-toggle="faqpassword_toggle">
4646
<label for="faqpassword">{{ msgPassword }}</label>
4747
</div>
48-
<span class="input-group-text" id="faqpassword_toggle">
48+
<span class="input-group-text" id="faqpassword_toggle" role="button" tabindex="0">
4949
<i class="bi bi-eye-slash" id="faqpassword_toggle_icon"></i>
5050
</span>
5151
</div>

phpmyfaq/assets/templates/admin/user/password.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<div class="input-group">
5252
<input type="password" autocomplete="off" name="faqpassword" id="faqpassword" class="form-control"
5353
data-pmf-toggle="faqpassword_toggle" required>
54-
<span class="input-group-text" id="faqpassword_toggle">
54+
<span class="input-group-text" id="faqpassword_toggle" role="button" tabindex="0">
5555
<i class="bi bi-eye-slash" id="faqpassword_toggle_icon"></i>
5656
</span>
5757
</div>

phpmyfaq/assets/templates/default/login.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/>
4747
<label for="faqpassword">{{ password }}</label>
4848
</div>
49-
<span class="input-group-text" id="faqpassword_toggle">
49+
<span class="input-group-text" id="faqpassword_toggle" role="button" tabindex="0">
5050
<i class="bi bi-eye-slash" id="faqpassword_toggle_icon"></i>
5151
</span>
5252
</div>

phpmyfaq/assets/templates/default/ucp.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
required
9494
{{ readonly }}
9595
/>
96-
<span class="input-group-text" id="faqpassword_toggle">
96+
<span class="input-group-text" id="faqpassword_toggle" role="button" tabindex="0">
9797
<i class="bi bi-eye-slash" id="faqpassword_toggle_icon"></i>
9898
</span>
9999
</div>

0 commit comments

Comments
 (0)