@eui/styles 19.3.8-snapshot-1761726526963 → 19.3.8-snapshot-1761812887182

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.
@@ -107,3 +107,10 @@ $outline-size: 2px;
107
107
  }
108
108
  }
109
109
 
110
+ // Mixin for applying focus outline to pseudo-elements (like scrollbar thumbs)
111
+ // This doesn't use :not([readonly]) since pseudo-elements don't support attribute selectors, that's why a new mixin is needed
112
+ @mixin eui-accessible-focus-pseudo($offset: $outline-offset, $size: $outline-size) {
113
+ outline: $size solid var(--eui-c-focus-visible) !important;
114
+ outline-offset: $offset !important;
115
+ }
116
+
@@ -1,3 +1,5 @@
1
+ @use 'accessibility.mixins' as a11y;
2
+
1
3
  @mixin eui-scrollbars( $size: 8px, $foreground-color: var(--_eui-scrollbars-foreground-color), $background-color: var(--eui-c-s-secondary-surface-light), $border-radius: 5rem, $state: active ) {
2
4
 
3
5
  &::-webkit-scrollbar {
@@ -27,6 +29,19 @@
27
29
  }
28
30
  }
29
31
 
32
+ // Apply focus and keyboard focus to scrollbar thumb when the scrollable container is focused
33
+ &:focus::-webkit-scrollbar-thumb {
34
+ @if ($state == active) {
35
+ @include a11y.eui-accessible-focus-pseudo;
36
+ }
37
+ }
38
+
39
+ &:focus-visible::-webkit-scrollbar-thumb {
40
+ @if ($state == active) {
41
+ @include a11y.eui-accessible-focus-pseudo;
42
+ }
43
+ }
44
+
30
45
  // This is the scroll container
31
46
  &::-webkit-scrollbar-track {
32
47
  @if ($state == active) {
@@ -44,6 +59,14 @@
44
59
  // scrollbar-gutter: stable;
45
60
  scrollbar-width: auto;
46
61
  }
62
+
63
+ // Firefox focus state for scrollbar
64
+ &:focus,
65
+ &:focus-visible {
66
+ @-moz-document url-prefix() {
67
+ scrollbar-color: var(--eui-c-focus-visible) var(--eui-c-s-secondary-surface-light);
68
+ }
69
+ }
47
70
  }
48
71
  @mixin eui-scrollbars-inactive($size: 8px) {
49
72
  &::-webkit-scrollbar {