@kubex/zinc 1.1.152 → 1.1.153

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.152",
3
+ "version": "1.1.153",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -1,9 +1,13 @@
1
1
  @use "./spacing-mixins";
2
2
 
3
+ $scrollbar-size: 5px;
4
+ $scrollbar-thumb: rgba(var(--inverse-base), 0.2);
5
+ $scrollbar-thumb-hover: rgba(var(--inverse-base), 0.6);
6
+
3
7
  @mixin scrollbars {
4
8
  ::-webkit-scrollbar {
5
- width: 5px;
6
- height: 5px;
9
+ width: $scrollbar-size;
10
+ height: $scrollbar-size;
7
11
  }
8
12
 
9
13
  /* Track */
@@ -13,12 +17,37 @@
13
17
 
14
18
  /* Handle */
15
19
  ::-webkit-scrollbar-thumb {
16
- background: rgba(var(--inverse-base), 0.2);
17
- border-radius: 5px;
20
+ background: $scrollbar-thumb;
21
+ border-radius: $scrollbar-size;
18
22
  }
19
23
 
20
24
  /* Handle on hover */
21
25
  ::-webkit-scrollbar-thumb:hover {
22
- background: rgba(var(--inverse-base), 0.6);
26
+ background: $scrollbar-thumb-hover;
27
+ }
28
+ }
29
+
30
+ // `scrollbars` only reaches descendant scroll areas; this styles an element that
31
+ // is itself the scroller
32
+ @mixin scrollbars-self {
33
+ scrollbar-width: thin;
34
+ scrollbar-color: $scrollbar-thumb transparent;
35
+
36
+ &::-webkit-scrollbar {
37
+ width: $scrollbar-size;
38
+ height: $scrollbar-size;
39
+ }
40
+
41
+ &::-webkit-scrollbar-track {
42
+ background: transparent;
43
+ }
44
+
45
+ &::-webkit-scrollbar-thumb {
46
+ background: $scrollbar-thumb;
47
+ border-radius: $scrollbar-size;
48
+ }
49
+
50
+ &::-webkit-scrollbar-thumb:hover {
51
+ background: $scrollbar-thumb-hover;
23
52
  }
24
53
  }
@@ -304,6 +304,14 @@
304
304
  padding: var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));
305
305
  gap: var(--zn-base-px);
306
306
  height: 50px;
307
+
308
+ // The height is fixed, so a second row would spill over the bar — scroll
309
+ // sideways instead of wrapping
310
+ flex-wrap: nowrap;
311
+ overflow-x: auto;
312
+ overflow-y: hidden;
313
+
314
+ @include mixins.scrollbars-self;
307
315
  }
308
316
 
309
317
  .scroll-container {