Hopefully this question isn't a duplicate of Transitioning between open close in details element
Problem with html <details>
when <summary>
expanded
When html <details>
has a <summary>
that is clicked open, the user is forced to manually scroll to see expanded paragraph below the summary. In the following GIF example:
- the "C" group of tags is expanded
- manual scroll required to make "command-line" tag visible
- the "command-line" tag is expanded
- manual scroll required to make "2018-02-22" through "2018-03-26" date range visible
- the "2018-02-22..." date range is expanded
- manual scroll required to make posts in "2018-02-22..." visible
Sample GIF
How to avoid all that manual scrolling?
It would be nice to avoid all the manual scrolling and simply make the browser do it automatically. Bonus if expanding and closing could "bounce open" and "bounce closed".
Perhaps jquery
must be used as in this Q&A: Click expand with details and summary tag
Sample html
and css
/ scss
code can be provided. The website is generated by GitHub Pages. The html
for tags by post is created by a custom python program because I didn't know how to do it using Jekyll / Liquid to parse the _posts/
directory and generate html with Kramdown idiosyncrasies taken into account.