Skip to content

Commit

Permalink
Patching Tocbot for Waterfox
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Jul 31, 2024
1 parent 2ed9cac commit c90c775
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions waterfox/browser/components/preferences/content/tocbot.css
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
.toc{overflow-y:auto}.toc>.toc-list{overflow:hidden;position:relative}.toc>.toc-list li{list-style:none}.toc-list{margin:0;padding-left:10px}a.toc-link{color:currentColor;height:100%}.is-collapsible{max-height:1000px;overflow:hidden;transition:all 300ms ease-in-out}.is-collapsed{max-height:0}.is-position-fixed{position:fixed !important;top:0}.is-active-link{font-weight:700}.toc-link::before{background-color:#eee;content:" ";display:inline-block;height:inherit;left:0;margin-top:-1px;position:absolute;width:2px}.is-active-link::before{background-color:#54bc4b}/*# sourceMappingURL=tocbot.css.map */

/* Patched version */
.toc {
display: block;
position: fixed;
right: 34px;
width: 300px;
}
@media (max-width: 1280px) {
.toc {
display: none;
}
}

.toc-list-item:not(:last-child) {
margin-bottom: 10px;
}

.toc-link {
font-size: 1.14em; /* as h2 */
text-decoration: none;
}
.toc-link::before {
background-color: #eeeeee;
}
.is-active-link::before{
background-color: #dededf;
}
@media (prefers-color-scheme: dark) {
.toc-link::before {
background-color: #2c2b32;
}
.is-active-link::before{
background-color: #3b3141;
}
}
2 changes: 1 addition & 1 deletion waterfox/browser/components/preferences/content/tocbot.js

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

0 comments on commit c90c775

Please sign in to comment.