Skip to content

Commit 1f428b5

Browse files
committed
fix(styles): LangToggle a11y isues and BEM formatting
1 parent 65d646a commit 1f428b5

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

.changeset/dull-teachers-allow.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ilo-org/styles": patch
3+
---
4+
5+
**LanguageToggle:** Fix accessibility issues and BEM classnames

packages/styles/scss/components/_languagetoggle.scss

+20-5
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,34 @@
88
--ilo--language-toggle-bg: transparent;
99
--ilo--language-toggle-bg-hover: transparent;
1010

11-
&--dark {
12-
--ilo--language-toggle-color: var(--ilo-color-blue-dark);
13-
--ilo--language-toggle-color-hover: var(--ilo-color-white);
11+
&__theme {
12+
&__dark {
13+
--ilo--language-toggle-color: var(--ilo-color-blue-dark);
14+
--ilo--language-toggle-color-hover: var(--ilo-color-white);
15+
}
1416
}
1517

1618
&:hover,
17-
&--open {
19+
&__open {
1820
--ilo--language-toggle-color: var(--ilo--language-toggle-color-hover);
1921
--ilo--language-toggle-bg: var(--ilo--language-toggle-bg-hover);
2022
}
2123

24+
display: inline-block;
25+
2226
&--container {
23-
all: unset;
27+
// Button unsets to perserve accessibility
28+
background: none;
29+
border: none;
30+
padding: 0;
31+
margin: 0;
32+
font: inherit;
33+
color: inherit;
34+
outline: none;
35+
box-shadow: none;
36+
appearance: none;
37+
cursor: pointer;
38+
2439
display: flex;
2540
align-items: center;
2641
gap: px-to-rem(4px);

0 commit comments

Comments
 (0)