WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 3 files changed +9
-17
lines changed
Expand file tree Collapse file tree 3 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,12 @@ function Second() {
7171 < dialog id = { id } ref = { ( e ) => {
7272 if ( ! e ) return
7373 const observer = new IntersectionObserver ( ( [ entry ] ) => ! entry . isIntersecting && e . close ( ) , { rootMargin : '-1px' } )
74- observer . observe ( e . querySelector < HTMLDivElement > ( '[data-dialog-area]' ) ! )
74+ const area = e . querySelector < HTMLDivElement > ( '[data-dialog-area]' ) !
75+ observer . observe ( area )
7576 const controller = new AbortController ( )
7677 e . addEventListener ( 'beforetoggle' , ( event ) => {
7778 if ( event . newState === 'open' ) requestAnimationFrame ( ( ) => {
78- e . scrollTop = e . querySelector < HTMLDivElement > ( '[data-dialog-bumper="before"]' ) ! . getBoundingClientRect ( ) . height
79+ e . scrollTop = area . offsetTop
7980 e . querySelector < HTMLDivElement > ( '[data-dialog-content]' ) ! . scrollTop = 0
8081 } )
8182 } , { signal : controller . signal } )
@@ -84,13 +85,11 @@ function Second() {
8485 observer . disconnect ( )
8586 }
8687 } } >
87- < div data-dialog-bumper = "before" />
8888 < div data-dialog-area onClick = { onClose } >
8989 < div data-dialog-content onClick = { ( e ) => e . stopPropagation ( ) } >
9090 < Content id = { id } />
9191 </ div >
9292 </ div >
93- < div data-dialog-bumper = "after" />
9493 </ dialog >
9594 </ div >
9695 )
Original file line number Diff line number Diff line change 149149 background-color : rgba (0 , 0 , 0 , 0.5 );
150150 }
151151
152- & > div [data-dialog-bumper = "before" ] {
152+ & ::before ,
153+ & ::after {
154+ content : "" ;
155+ display : block;
153156 min-height : 200dvh ;
154157 width : 100% ;
155158 scroll-snap-align : start;
156- /* outline: 2px solid blue;
157- outline-offset: -2px; */
158- }
159-
160- & > div [data-dialog-bumper = "after" ] {
161- min-height : 200dvh ;
162- width : 100% ;
163- scroll-snap-align : start;
164- /* outline: 2px solid red;
165- outline-offset: -2px; */
166159 }
167160
168161 & > div [data-dialog-area ] {
178171 place-items : center;
179172 }
180173
181- & > div [ data-dialog-area ] > div [data-dialog-content ] {
174+ & > div > div [data-dialog-content ] {
182175 overflow : hidden auto;
183176 scrollbar-width : none;
184177
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export const ROUTES = {
175175 tags : [ 'css' ]
176176 } ,
177177 git : {
178- lastModified : 1764247721000 ,
178+ lastModified : 1764268201000 ,
179179 firstAdded : 1764198910000
180180 } ,
181181 } ,
You can’t perform that action at this time.
0 commit comments