Skip to content

Commit

Permalink
fix(css): toc scroll (#1805)
Browse files Browse the repository at this point in the history
A typo in the max height definition prevented the right toc from
scrolling if you have many entries, like
[here](https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html).
  • Loading branch information
kai687 authored Apr 23, 2024
1 parent 00ae718 commit a720d05
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 141 deletions.
2 changes: 1 addition & 1 deletion docs/readthedocs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.9" and python_full_version <= "3.12.0"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (sys_platform == "win32" or python_full_version <= "3.12.0")
docutils==0.20.1 ; python_version >= "3.8" and python_version < "4.0"
exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11"
exceptiongroup==1.2.1 ; python_version >= "3.9" and python_version < "3.11"
h11==0.14.0 ; python_version >= "3.9" and python_full_version <= "3.12.0"
idna==3.7 ; python_version >= "3.8" and python_version < "4.0"
imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0"
Expand Down
29 changes: 9 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sphinxawesome-theme"
version = "5.1.3"
version = "5.1.4"
description = "An awesome theme for the Sphinx documentation generator"
readme = "README.md"
authors = ["Kai Welke <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ importlib-resources==6.4.0 ; python_version == "3.8"
installer==0.7.0 ; python_version == "3.8"
jaraco-classes==3.4.0 ; python_version == "3.8"
jeepney==0.8.0 ; sys_platform == "linux" and python_version == "3.8"
keyring==25.1.0 ; python_version == "3.8"
keyring==24.3.1 ; python_version == "3.8"
more-itertools==10.2.0 ; python_version == "3.8"
msgpack==1.0.8 ; python_version == "3.8"
nox==2024.4.15 ; python_version == "3.8"
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/sphinxawesome_theme/static/theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sphinxawesome_theme/static/theme.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sphinxawesome_theme/toc.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{#- Template for the on-page TOC -#}

<aside id="right-sidebar" class="hidden text-sm xl:block">
<div class="sticky top-16 -mt-10 max-h-[calc(var(100vh)-5rem)] overflow-y-auto pt-6 space-y-2">
<div class="sticky top-16 -mt-10 max-h-[calc(100vh-5rem)] overflow-y-auto pt-6 space-y-2">
{%- block toc_before %}{%- endblock -%}
<p class="font-medium">On this page</p>
{{ toc }}
Expand Down
10 changes: 5 additions & 5 deletions src/theme-src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sphinxawesome-theme",
"version": "5.1.3",
"version": "5.1.4",
"scripts": {
"build": "NODE_ENV=production webpack",
"dev": "NODE_ENV=development webpack --watch --progress",
Expand All @@ -14,8 +14,8 @@
"author": "Kai Welke",
"license": "MIT",
"dependencies": {
"@alpinejs/intersect": "^3.13.8",
"alpinejs": "^3.13.8",
"@alpinejs/intersect": "^3.13.9",
"alpinejs": "^3.13.9",
"clipboard": "^2.0.11"
},
"devDependencies": {
Expand All @@ -37,11 +37,11 @@
"postcss": "^8.4.38",
"postcss-import": "^16.1.0",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^9.5.6",
"postcss-preset-env": "^9.5.9",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-tailwindcss": "^0.5.14",
"stylelint": "^16.3.1",
"stylelint": "^16.4.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-prettier": "^5.0.0",
"stylelint-webpack-plugin": "^5.0.0",
Expand Down
Loading

0 comments on commit a720d05

Please sign in to comment.