Skip to content

Commit 55d5e9d

Browse files
committed
fix: Make aria-current selector more specific on links
1 parent 8ba5740 commit 55d5e9d

14 files changed

+9735
-1245
lines changed

css/pico.classless.css

+578-385
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.classless.css.map

+78-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.classless.min.css

+2,422-2
Large diffs are not rendered by default.

css/pico.css

+701-453
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.css.map

+84-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.fluid.classless.css

+578-385
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.fluid.classless.css.map

+78-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.fluid.classless.min.css

+2,385-2
Large diffs are not rendered by default.

css/pico.min.css

+2,818-2
Large diffs are not rendered by default.

scss/components/_dropdown.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
&:focus,
178178
&:active,
179179
&:focus-visible,
180-
&[aria-current] {
180+
&[aria-current]:not([aria-current="false"]) {
181181
background-color: var(#{$✨}dropdown-hover-background-color);
182182
}
183183
}

scss/components/_modal.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
transition: opacity var(#{$✨}transition);
9494
}
9595

96-
&:is([aria-current], :hover, :active, :focus) {
96+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
9797
opacity: 1;
9898
}
9999
}

scss/components/_nav.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
}
9797

9898
// Minimal support for aria-current
99-
& a[aria-current] {
99+
& a[aria-current]:not([aria-current="false"]) {
100100
background-color: transparent;
101101
color: inherit;
102102
text-decoration: none;

scss/content/_button.scss

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
color var(#{$✨}transition), box-shadow var(#{$✨}transition);
6363
}
6464

65-
&:is([aria-current], :hover, :active, :focus) {
65+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
6666
#{$✨}background-color: var(#{$✨}primary-hover-background);
6767
#{$✨}border-color: var(#{$✨}primary-hover-border);
6868
#{$✨}box-shadow: var(#{$✨}button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
@@ -92,7 +92,7 @@
9292
#{$✨}color: var(#{$✨}secondary-inverse);
9393
cursor: pointer;
9494

95-
&:is([aria-current], :hover, :active, :focus) {
95+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
9696
#{$✨}background-color: var(#{$✨}secondary-hover-background);
9797
#{$✨}border-color: var(#{$✨}secondary-hover-border);
9898
#{$✨}color: var(#{$✨}secondary-inverse);
@@ -110,7 +110,7 @@
110110
#{$✨}border-color: var(#{$✨}contrast-border);
111111
#{$✨}color: var(#{$✨}contrast-inverse);
112112

113-
&:is([aria-current], :hover, :active, :focus) {
113+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
114114
#{$✨}background-color: var(#{$✨}contrast-hover-background);
115115
#{$✨}border-color: var(#{$✨}contrast-hover-border);
116116
#{$✨}color: var(#{$✨}contrast-inverse);
@@ -129,7 +129,7 @@
129129
#{$✨}color: var(#{$✨}primary);
130130
#{$✨}border-color: currentColor;
131131

132-
&:is([aria-current], :hover, :active, :focus) {
132+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
133133
#{$✨}background-color: transparent;
134134
#{$✨}color: var(#{$✨}primary-hover);
135135
}
@@ -141,7 +141,7 @@
141141
#{$✨}color: var(#{$✨}secondary);
142142
#{$✨}border-color: currentColor;
143143

144-
&:is([aria-current], :hover, :active, :focus) {
144+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
145145
#{$✨}color: var(#{$✨}secondary-hover);
146146
}
147147
}
@@ -150,7 +150,7 @@
150150
:is(button, [type="submit"], [type="button"], [role="button"]).outline.contrast {
151151
#{$✨}color: var(#{$✨}contrast);
152152

153-
&:is([aria-current], :hover, :active, :focus) {
153+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
154154
#{$✨}color: var(#{$✨}contrast-hover);
155155
}
156156
}
@@ -163,7 +163,7 @@
163163
#{$✨}color: var(#{$✨}secondary-inverse);
164164
cursor: pointer;
165165

166-
&:is([aria-current], :hover, :active, :focus) {
166+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
167167
#{$✨}background-color: var(#{$✨}secondary-hover);
168168
#{$✨}border-color: var(#{$✨}secondary-hover);
169169
}

scss/content/_link.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
text-decoration var(#{$✨}transition), box-shadow var(#{$✨}transition);
2424
}
2525

26-
&:is([aria-current], :hover, :active, :focus) {
26+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
2727
#{$✨}color: var(#{$✨}primary-hover);
2828
#{$✨}underline: var(#{$✨}primary-hover-underline);
2929
#{$✨}text-decoration: underline;
@@ -39,7 +39,7 @@
3939
#{$✨}color: var(#{$✨}secondary);
4040
#{$✨}underline: var(#{$✨}secondary-underline);
4141

42-
&:is([aria-current], :hover, :active, :focus) {
42+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
4343
#{$✨}color: var(#{$✨}secondary-hover);
4444
#{$✨}underline: var(#{$✨}secondary-hover-underline);
4545
}
@@ -50,7 +50,7 @@
5050
#{$✨}color: var(#{$✨}contrast);
5151
#{$✨}underline: var(#{$✨}contrast-underline);
5252

53-
&:is([aria-current], :hover, :active, :focus) {
53+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
5454
#{$✨}color: var(#{$✨}contrast-hover);
5555
#{$✨}underline: var(#{$✨}contrast-hover-underline);
5656
}

0 commit comments

Comments
 (0)