mtrl 0.8.0-next.20 → 0.8.0-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
- package/src/styles/components/_menu.scss +10 -3
package/package.json
CHANGED
|
@@ -96,11 +96,18 @@ $component: "#{$prefix}-menu";
|
|
|
96
96
|
@include m.state-layer(t.color("on-surface"), "hover");
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// The focus layer is for a person navigating by key. Focus moves into
|
|
100
|
+
// the menu however it was opened, so keying this off `:focus` marked
|
|
101
|
+
// the first item as soon as the menu appeared under the pointer, which
|
|
102
|
+
// reads as a highlight nobody asked for.
|
|
99
103
|
&:focus {
|
|
100
|
-
@include m.state-layer(t.color("on-surface"), "focus");
|
|
101
104
|
outline: none;
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
&:focus-visible {
|
|
108
|
+
@include m.state-layer(t.color("on-surface"), "focus");
|
|
109
|
+
}
|
|
110
|
+
|
|
104
111
|
&:active {
|
|
105
112
|
@include m.state-layer(t.color("on-surface"), "pressed");
|
|
106
113
|
}
|
|
@@ -161,7 +168,7 @@ $component: "#{$prefix}-menu";
|
|
|
161
168
|
@include m.state-layer(t.color("on-secondary-container"), "hover");
|
|
162
169
|
}
|
|
163
170
|
|
|
164
|
-
&:focus {
|
|
171
|
+
&:focus-visible {
|
|
165
172
|
@include m.state-layer(t.color("on-secondary-container"), "focus");
|
|
166
173
|
}
|
|
167
174
|
|
|
@@ -381,7 +388,7 @@ $component: "#{$prefix}-menu";
|
|
|
381
388
|
@include m.state-layer(var(--#{$prefix}-menu-selected-label), "hover");
|
|
382
389
|
}
|
|
383
390
|
|
|
384
|
-
&:focus {
|
|
391
|
+
&:focus-visible {
|
|
385
392
|
@include m.state-layer(var(--#{$prefix}-menu-selected-label), "focus");
|
|
386
393
|
}
|
|
387
394
|
|