File tree Expand file tree Collapse file tree 8 files changed +40
-11
lines changed
special-pages/pages/history
integration-tests/history.screenshots.spec.js-snapshots Expand file tree Collapse file tree 8 files changed +40
-11
lines changed Original file line number Diff line number Diff line change 36
36
height : 100vh ;
37
37
background-color : var (--history-background-color );
38
38
}
39
+
39
40
.header {
40
41
grid-area : header;
41
42
padding-left : var (--main-padding-left );
@@ -44,14 +45,19 @@ body {
44
45
z-index : 1 ;
45
46
background-color : var (--history-background-color );
46
47
}
48
+
47
49
.search {
48
50
justify-self : flex-end;
49
51
}
52
+
50
53
.aside {
51
54
grid-area : aside;
52
55
padding : 10px 16px ;
56
+ /* Nav child will handle this to accommodate a scrollbar */
57
+ padding-right : 0 ;
53
58
border-right : 1px solid var (--history-surface-border-color );
54
59
}
60
+
55
61
.main {
56
62
grid-area : main;
57
63
overflow : auto;
@@ -60,6 +66,10 @@ body {
60
66
padding-top : 24px ;
61
67
}
62
68
69
+ /**
70
+ * The scrollbar is a custom scroller that is used in the main
71
+ * content area and the sidebar nav.
72
+ */
63
73
.customScroller {
64
74
overflow-y : scroll;
65
75
padding-right : calc (var (--main-padding-right ) - var (--scrollbar-width ));
70
80
*/
71
81
[data-platform = "windows" ] {
72
82
.customScroller {
83
+ overflow-y : auto;
73
84
scrollbar-gutter : stable;
74
85
scrollbar-width : var (--scrollbar-width );
75
86
scrollbar-color : var (--history-scrollbar-controls-color ) var (--history-background-color );
80
91
* macOS specific styling to handle dark mode - without this full
81
92
* override you cannot change the track color :(
82
93
*/
94
+ [data-platform = "integration" ],
83
95
[data-platform = "macos" ] {
84
96
.customScroller {
85
97
--webkit-thumb-color : rgba (136 , 136 , 136 , 0.8 );
@@ -116,4 +128,4 @@ body {
116
128
117
129
.paddedErrorRecovery {
118
130
margin-top : 1rem ;
119
- }
131
+ }
Original file line number Diff line number Diff line change 1
1
import { h } from 'preact' ;
2
2
import cn from 'classnames' ;
3
3
import styles from './Sidebar.module.css' ;
4
+ import AppStyles from './App.module.css' ;
4
5
import { useComputed } from '@preact/signals' ;
5
6
import { useTypedTranslation } from '../types.js' ;
6
7
import { Trash } from '../icons/Trash.js' ;
@@ -77,7 +78,7 @@ export function Sidebar({ ranges }) {
77
78
return (
78
79
< div class = { styles . stack } >
79
80
< h1 class = { styles . pageTitle } > { t ( 'page_title' ) } </ h1 >
80
- < nav class = { styles . nav } >
81
+ < nav class = { cn ( styles . nav , AppStyles . customScroller ) } >
81
82
{ ranges . value . map ( ( range ) => {
82
83
return (
83
84
< Item key = { range . id } onClick = { onClick } onDelete = { onDelete } current = { current } range = { range . id } count = { range . count } />
Original file line number Diff line number Diff line change 1
1
.stack {
2
2
display : flex;
3
3
flex-direction : column;
4
- > * {
4
+ height : 100% ;
5
+
6
+ > * {
5
7
min-width : 0
6
8
}
9
+
7
10
gap : 24px ;
8
11
}
12
+
9
13
.pageTitle {
10
14
color : var (--history-text-normal );
11
15
font-size : var (--title-font-size );
12
16
font-weight : var (--title-font-weight );
13
17
line-height : 24px ;
14
18
padding : 10px 6px 10px 10px ;
15
19
}
16
- .nav {}
20
+
21
+ .nav {
22
+ padding-right : 0 ;
23
+ }
24
+
17
25
.item {
18
26
position : relative;
19
27
border-radius : 8px ;
20
28
display : flex;
21
29
22
- & : hover , & : focus-visible {
30
+ & : hover ,
31
+ & : focus-visible {
23
32
background : var (--color-black-at-6 );
24
33
}
25
34
26
- [data-theme = "dark" ] & {
27
- & : hover , & : focus-visible {
35
+ [data-theme = "dark" ] & {
36
+
37
+ & : hover ,
38
+ & : focus-visible {
28
39
background : var (--color-white-at-6 );
29
40
}
30
41
}
37
48
38
49
.active {
39
50
background : var (--color-black-at-12 );
51
+
40
52
& : hover {
41
53
background : var (--color-black-at-18 );
42
54
}
43
55
44
- [data-theme = "dark" ] & {
56
+ [data-theme = "dark" ] & {
45
57
background : var (--color-white-at-9 );
58
+
46
59
& : hover {
47
60
background : var (--color-white-at-12 );
48
61
}
88
101
color : var (--history-text-normal );
89
102
90
103
& : not ([aria-disabled = "true" ]) {
91
- & : hover , & : focus-visible {
104
+
105
+ & : hover ,
106
+ & : focus-visible {
92
107
background : var (--color-black-at-9 );
93
108
opacity : 1 ;
94
109
}
102
117
& : hover {
103
118
background : var (--color-white-at-9 );
104
119
}
120
+
105
121
& : active {
106
122
background : var (--color-white-at-12 );
107
123
}
111
127
opacity : 1 ;
112
128
}
113
129
114
- .link : focus-visible + & {
130
+ .link : focus-visible + & {
115
131
opacity : 1 ;
116
132
}
117
133
Original file line number Diff line number Diff line change 67
67
--history-text-normal : var (--color-white-at-84 );
68
68
--history-text-invert : var (--color-black-at-84 );
69
69
--history-text-muted : var (--color-white-at-60 );
70
- }
70
+ }
You can’t perform that action at this time.
0 commit comments