quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Explorer view creates transparency bar on mobile

Open pauladam316 opened this issue 1 year ago • 6 comments

Describe the bug When adding in the explorer view to mobile, a transparent gradient bar appears on the page in the middle of the content. The bar appears to show up regardless of where in the page you insert the explorer view, I tried adding it to the "beforebody" and "right" sections

To Reproduce

  • add explorer view to mobile site via layout.ts
  • load the page on mobile
  • bar appears

Expected behavior A clear and concise description of what you expected to happen.

Screenshots and Source IMG_0736

Desktop (please complete the following information):

  • Quartz Version: v4.2.2
  • node Version: v21.6.1
  • npm version: 10.2.4
  • OS: iOS
  • Browser: Safari

pauladam316 avatar Feb 20 '24 13:02 pauladam316

What bar are you referring to here?

seems like you just need to adjust the margin?

aarnphm avatar Feb 26 '24 15:02 aarnphm

Here as well.

Screenshot_20240426_191824.jpg

Ks4four avatar Apr 26 '24 11:04 Ks4four

Oh I think it is overflow in CSS afaik.

aarnphm avatar Apr 29 '24 01:04 aarnphm

I use the original CSS. Is there anything I can fix?

Ks4four avatar Apr 29 '24 03:04 Ks4four

Hello, I confirm this issue on a vanilla installation.

ZetaKebab avatar Apr 30 '24 13:04 ZetaKebab

The problem may be that the ::after isn't placed after the explorer-end. The height is incorrect in the box model in Web Developer Tools. I tried fiddling with bass.scss:

ul.overflow,
ol.overflow {
...

 &:after {
   /* ... */
   position: absolute;
   /* ... */

but I couldn't get it to work.

Ks4four avatar May 01 '24 06:05 Ks4four

I have also reproduced this behaviour using vanilla CSS. The only change I had made was adding Component.MobileOnly(Component.Explorer()), to :file_folder: quartz.layout.ts.

cbarkr avatar Jun 13 '24 18:06 cbarkr

The issue appears to be that the ::after pseudo-element (a child of either ul.overflow or ol.overflow; the element that applies the linear gradient) uses position: absolute when its parent does not use position: relative. After adding the correct layout property to the parent, ::after was moved to the correct position.

Before

image image

After

image image

Shall I make a PR?

cbarkr avatar Jun 13 '24 19:06 cbarkr