Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mardown's foldable lists #109

Open
brvtalcake opened this issue Feb 18, 2025 · 1 comment
Open

Fix mardown's foldable lists #109

brvtalcake opened this issue Feb 18, 2025 · 1 comment

Comments

@brvtalcake
Copy link

Hello !

As I was looking at the live preview (and also while working on my own blog, since it uses/will use your theme), I noticed a (quite minor, but still a) problem with the foldable lists. Specifically, clicking a foldable list to unfold it makes the clicked <summary> be larger than the others, until another element of the page is clicked. This then makes the interaction with other summaries (or anything clickable below the clicked summary) a bit clunky, since these are thrown back up only after we click them. This makes it impossible to click them if they are too small or if the cursor happen to be outside the newly clicked box after the click is issued.

For example, go to https://not-matthias.github.io/apollo/posts/markdown/#foldable-text, and click the first list item, then put your cursor at the very bottom of the box of the second item, and you won't be able to click it.

I suggest to only make the list item bigger when it is pointed at. Not quite sure this is hard to do (I guess not ?), but since I'm chite at anything web-/frontend- related, I would appreciate someone more competent to fix it (if this is what you want, naturally).

Cheers

@brvtalcake
Copy link
Author

After going through little experiments, I figured changing the end of sass/parts/_note.scss with :

summary:hover {
  color: var(--primary-color);
  background-color: var(--note-header-bg);
  outline: none;
  padding: {
    top: 10px;
    bottom: 10px;
    left: 10px;
  }
  overflow: visible;
  position: relative;
  left: -10px;
}

seemed a little better.

The only relevant part for solving this issue actually being changing summary:hover, summary:focus with simply summary:hover. The remaining changes are pure esthetical considerations. Feel free to test them and add them if you feel like it.
I didn't have neither the time nor the energy to fork and open a pull request as I already forked your repo, but with other adjustements. Maybe later if you will, so I can take some time to recreate a branch etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant