Skip to content

Commit f6d24af

Browse files
committed
minor css fix for high contrast mode
The Braille Institute's "Atkinson Hyperlegible Next" font has been added for high contrast mode (in theme.css, so you can easily disable this font again) and some minor CSS changes have been made to achieve better accessibility (A11y).
1 parent 6957187 commit f6d24af

File tree

2 files changed

+52
-6
lines changed

2 files changed

+52
-6
lines changed

phpmyfaq/assets/scss/layout/_theme-switcher.scss

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,35 @@
256256
color: #ffffff !important;
257257
}
258258

259+
//Theme Switcher Button for high contrast mode
260+
.pmf-theme-switcher {
261+
button {
262+
color: var(--bs-light) !important;
263+
border: none;
264+
background: transparent;
265+
transition: all 0.3s ease;
266+
opacity: 1;
267+
268+
&:hover {
269+
color: var(--bs-dark) !important;
270+
background: #ffffff !important;
271+
opacity: 1;
272+
}
273+
274+
&.active {
275+
color: var(--bs-dark) !important;
276+
opacity: 1;
277+
background: #ffff00 !important;
278+
}
279+
280+
i {
281+
font-size: 1.3rem;
282+
transition: transform 0.3s ease;
283+
}
284+
285+
}
286+
}
287+
259288
// Navigation adjustments for high contrast mode
260289
.text-bg-pmf-nav {
261290
background-color: #000000 !important;
@@ -332,9 +361,10 @@
332361
// Form elements
333362
.form-control,
334363
.form-select {
335-
background-color: #000000;
336-
border: 2px solid #ffffff;
337-
color: #ffffff;
364+
background-color: #ffff00;
365+
border: 2px solid #ffff00;
366+
color: #000000;
367+
font-size: 1.3rem;
338368

339369
&:focus {
340370
background-color: #000000;
@@ -347,13 +377,14 @@
347377
.dropdown-menu {
348378
background-color: #000000;
349379
border: 2px solid #ffffff;
350-
380+
font-size: 1.2rem;
381+
351382
.dropdown-item {
352383
color: #ffffff;
353384

354385
&:hover,
355386
&:focus {
356-
background-color: #ffffff;
387+
background-color: #ffff00;
357388
color: #000000;
358389
}
359390
}
@@ -490,7 +521,9 @@
490521
color: #ffffff !important;
491522

492523
&:hover {
493-
background-color: #333333;
524+
background-color: #ffff00;
525+
color: #000!important;
526+
border-radius: 5px;
494527
}
495528
}
496529
}

phpmyfaq/assets/templates/default/theme.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* @since 2024-09-01
1414
*/
1515

16+
/* Font -Atkinson Hyperlegible Next- from Braille Institute for high-contrast mode to achieve better A11y */
17+
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap');
18+
1619
:root,
1720
[data-bs-theme='light'] {
1821
--bs-light: #eceff9;
@@ -69,4 +72,14 @@
6972
--bs-border-color: #ffffff;
7073
--bs-link-color: #ffff00;
7174
--bs-link-hover-color: #ffff66;
75+
76+
/* Individual high-contrast adjustments */
77+
78+
body{
79+
font-family: "Atkinson Hyperlegible Next" !important;
80+
font-size: 1.3rem;
81+
font-optical-sizing: auto;
82+
font-weight: 800;
83+
font-style: normal;
84+
}
7285
}

0 commit comments

Comments
 (0)