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 3636 height : 100vh ;
3737 background-color : var (--history-background-color );
3838}
39+
3940.header {
4041 grid-area : header;
4142 padding-left : var (--main-padding-left );
@@ -44,14 +45,19 @@ body {
4445 z-index : 1 ;
4546 background-color : var (--history-background-color );
4647}
48+
4749.search {
4850 justify-self : flex-end;
4951}
52+
5053.aside {
5154 grid-area : aside;
5255 padding : 10px 16px ;
56+ /* Nav child will handle this to accommodate a scrollbar */
57+ padding-right : 0 ;
5358 border-right : 1px solid var (--history-surface-border-color );
5459}
60+
5561.main {
5662 grid-area : main;
5763 overflow : auto;
@@ -60,6 +66,10 @@ body {
6066 padding-top : 24px ;
6167}
6268
69+ /**
70+ * The scrollbar is a custom scroller that is used in the main
71+ * content area and the sidebar nav.
72+ */
6373.customScroller {
6474 overflow-y : scroll;
6575 padding-right : calc (var (--main-padding-right ) - var (--scrollbar-width ));
7080 */
7181[data-platform = "windows" ] {
7282 .customScroller {
83+ overflow-y : auto;
7384 scrollbar-gutter : stable;
7485 scrollbar-width : var (--scrollbar-width );
7586 scrollbar-color : var (--history-scrollbar-controls-color ) var (--history-background-color );
8091 * macOS specific styling to handle dark mode - without this full
8192 * override you cannot change the track color :(
8293 */
94+ [data-platform = "integration" ],
8395[data-platform = "macos" ] {
8496 .customScroller {
8597 --webkit-thumb-color : rgba (136 , 136 , 136 , 0.8 );
@@ -116,4 +128,4 @@ body {
116128
117129.paddedErrorRecovery {
118130 margin-top : 1rem ;
119- }
131+ }
Original file line number Diff line number Diff line change 11import { h } from 'preact' ;
22import cn from 'classnames' ;
33import styles from './Sidebar.module.css' ;
4+ import AppStyles from './App.module.css' ;
45import { useComputed } from '@preact/signals' ;
56import { useTypedTranslation } from '../types.js' ;
67import { Trash } from '../icons/Trash.js' ;
@@ -77,7 +78,7 @@ export function Sidebar({ ranges }) {
7778 return (
7879 < div class = { styles . stack } >
7980 < h1 class = { styles . pageTitle } > { t ( 'page_title' ) } </ h1 >
80- < nav class = { styles . nav } >
81+ < nav class = { cn ( styles . nav , AppStyles . customScroller ) } >
8182 { ranges . value . map ( ( range ) => {
8283 return (
8384 < 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 11.stack {
22 display : flex;
33 flex-direction : column;
4- > * {
4+ height : 100% ;
5+
6+ > * {
57 min-width : 0
68 }
9+
710 gap : 24px ;
811}
12+
913.pageTitle {
1014 color : var (--history-text-normal );
1115 font-size : var (--title-font-size );
1216 font-weight : var (--title-font-weight );
1317 line-height : 24px ;
1418 padding : 10px 6px 10px 10px ;
1519}
16- .nav {}
20+
21+ .nav {
22+ padding-right : 0 ;
23+ }
24+
1725.item {
1826 position : relative;
1927 border-radius : 8px ;
2028 display : flex;
2129
22- & : hover , & : focus-visible {
30+ & : hover ,
31+ & : focus-visible {
2332 background : var (--color-black-at-6 );
2433 }
2534
26- [data-theme = "dark" ] & {
27- & : hover , & : focus-visible {
35+ [data-theme = "dark" ] & {
36+
37+ & : hover ,
38+ & : focus-visible {
2839 background : var (--color-white-at-6 );
2940 }
3041 }
3748
3849.active {
3950 background : var (--color-black-at-12 );
51+
4052 & : hover {
4153 background : var (--color-black-at-18 );
4254 }
4355
44- [data-theme = "dark" ] & {
56+ [data-theme = "dark" ] & {
4557 background : var (--color-white-at-9 );
58+
4659 & : hover {
4760 background : var (--color-white-at-12 );
4861 }
88101 color : var (--history-text-normal );
89102
90103 & : not ([aria-disabled = "true" ]) {
91- & : hover , & : focus-visible {
104+
105+ & : hover ,
106+ & : focus-visible {
92107 background : var (--color-black-at-9 );
93108 opacity : 1 ;
94109 }
102117 & : hover {
103118 background : var (--color-white-at-9 );
104119 }
120+
105121 & : active {
106122 background : var (--color-white-at-12 );
107123 }
111127 opacity : 1 ;
112128 }
113129
114- .link : focus-visible + & {
130+ .link : focus-visible + & {
115131 opacity : 1 ;
116132 }
117133
Original file line number Diff line number Diff line change 6767 --history-text-normal : var (--color-white-at-84 );
6868 --history-text-invert : var (--color-black-at-84 );
6969 --history-text-muted : var (--color-white-at-60 );
70- }
70+ }
You can’t perform that action at this time.
0 commit comments