Skip to content

Commit 5874338

Browse files
committed
feat(Grid): enhance mobile scrollbar UX with 40px touch targets and themed colors (#9379)
1 parent 4d4655d commit 5874338

6 files changed

Lines changed: 21 additions & 13 deletions

File tree

resources/scss/src/grid/VerticalScrollbar.scss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
bottom : 1px;
33
color-scheme: var(--grid-scrollbar-color-scheme, light);
44
opacity : 0;
5+
overflow-x : hidden;
56
overflow-y : scroll;
67
position : absolute;
78
right : 0;
@@ -15,7 +16,7 @@
1516
}
1617

1718
.neo-grid-scrollbar-content {
18-
width: 1px;
19+
width: 10px;
1920
}
2021
}
2122

@@ -28,10 +29,17 @@
2829
body.neo-has-touch {
2930
.neo-grid-vertical-scrollbar {
3031
opacity: 1;
31-
width : var(--grid-scrollbar-touch-width, 24px);
32+
width : var(--grid-scrollbar-touch-width, 40px);
3233

3334
&::-webkit-scrollbar {
34-
width: var(--grid-scrollbar-touch-width, 24px);
35+
width: var(--grid-scrollbar-touch-width, 40px);
36+
}
37+
38+
&::-webkit-scrollbar-thumb {
39+
background-clip : padding-box;
40+
background-color: var(--grid-scrollbar-thumb-color, rgba(128, 128, 128, 0.5));
41+
border : 8px solid transparent;
42+
border-radius : 16px;
3543
}
3644
}
3745
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root .neo-theme-cyberpunk { // .neo-grid-vertical-scrollbar
22
--grid-scrollbar-color-scheme: dark;
3-
--grid-scrollbar-touch-width : 24px;
3+
--grid-scrollbar-thumb-color : rgba(0, 255, 255, 0.4);
4+
--grid-scrollbar-touch-width : 40px;
45
--grid-scrollbar-width : 16px;
56
}
6-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root .neo-theme-dark { // .neo-grid-vertical-scrollbar
22
--grid-scrollbar-color-scheme: dark;
3-
--grid-scrollbar-touch-width : 24px;
3+
--grid-scrollbar-thumb-color : rgba(255, 255, 255, 0.4);
4+
--grid-scrollbar-touch-width : 40px;
45
--grid-scrollbar-width : 16px;
56
}
6-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root .neo-theme-light { // .neo-grid-vertical-scrollbar
22
--grid-scrollbar-color-scheme: light;
3-
--grid-scrollbar-touch-width : 24px;
3+
--grid-scrollbar-thumb-color : rgba(0, 0, 0, 0.4);
4+
--grid-scrollbar-touch-width : 40px;
45
--grid-scrollbar-width : 16px;
56
}
6-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root .neo-theme-neo-dark { // .neo-grid-vertical-scrollbar
22
--grid-scrollbar-color-scheme: dark;
3-
--grid-scrollbar-touch-width : 24px;
3+
--grid-scrollbar-thumb-color : rgba(255, 255, 255, 0.4);
4+
--grid-scrollbar-touch-width : 40px;
45
--grid-scrollbar-width : 16px;
56
}
6-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root .neo-theme-neo-light { // .neo-grid-vertical-scrollbar
22
--grid-scrollbar-color-scheme: light;
3-
--grid-scrollbar-touch-width : 24px;
3+
--grid-scrollbar-thumb-color : rgba(0, 0, 0, 0.4);
4+
--grid-scrollbar-touch-width : 40px;
45
--grid-scrollbar-width : 16px;
56
}
6-

0 commit comments

Comments
 (0)