File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 2727 if (open && ! dialogElement .open ) {
2828 dialogElement .showModal ();
2929
30+ dialogElement .scrollTop = 0 ;
31+
3032 return ;
3133 }
3234
4042 return ;
4143 }
4244
43- document .documentElement .style .overflow = open ? ' hidden' : ' ' ;
44- document .body .style .overflow = open ? ' hidden' : ' ' ;
45+ const overflowClassName = ' overflow-hidden' ;
46+
47+ document .documentElement .classList .toggle (overflowClassName , open );
48+ document .body .classList .toggle (overflowClassName , open );
4549
4650 return () => {
47- document .documentElement .style . overflow = ' ' ;
48- document .body .style . overflow = ' ' ;
51+ document .documentElement .classList . remove ( overflowClassName ) ;
52+ document .body .classList . remove ( overflowClassName ) ;
4953 };
5054 });
5155 </script >
7175 max-width : 100% ;
7276 padding : var (--space-none );
7377
78+ background-color : var (--color-gray );
79+ border : 1px solid var (--color-black );
7480 overflow-y : auto ;
7581 overflow-x : hidden ;
7682 overscroll-behavior : contain ;
7783 -webkit-overflow-scrolling : touch ;
7884
79- border : 1px solid var (--color-black );
80-
8185 @include media .at (' small' ) {
8286 height : auto ;
8387 max-height : calc (100 dvh - (var (--space-medium ) * 2 ));
Original file line number Diff line number Diff line change 1- @use ' ../tools/mixins-media' as media ;
2-
31// --------------------------------------------
42// Spacing
53// --------------------------------------------
119 --space-none : 0 ;
1210 --space-auto : auto ;
1311}
12+
13+ // --------------------------------------------
14+ // Overflow
15+ // --------------------------------------------
16+ .overflow-hidden {
17+ overflow : hidden ;
18+ }
You can’t perform that action at this time.
0 commit comments