You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want my sidebar to scroll along with the main page content. Said content is longer than the sidebar, so it is not a problem. I tried to use the method suggested here: #2612 but with no effect.
Overriding the sidebar include to remove the sticky class has no effect. It seems the class is forcefully added by JS code after the page loads.
Hosted on GitHub Pages (if yes provide URL to site): No
Operating system: ruby:latest Docker image
Expected behavior
The sidebar should remain non-sticky instead of being forced as sticky.
Steps to reproduce the behavior
Override _includes/sidebar.html
Remove the sticky class from the div tag on line 2
Build the site with Jekyll and open a page that has the sidebar enabled
On screens larger than 1024px, Javascript code will add the sticky class back to the sidebar, making the above manipulation useless.
Other
The culprit code is in file assets/js/_main.js, from lines 9 to 28. I do not want to override this file in my site, as it would make it unmaintainable when future theme updates are released. I am also reluctant to create my own Javascript code to counteract this function's behavior, both because I don't know about side effects and because the order in which event functions trigger is undefined.
The workaround I am currently using is a CSS override to remove the effects of the sticky class on the sidebar (unsetting position and max-height in particular).
The text was updated successfully, but these errors were encountered:
What happened?
I want my sidebar to scroll along with the main page content. Said content is longer than the sidebar, so it is not a problem. I tried to use the method suggested here: #2612 but with no effect.
Overriding the
sidebar
include to remove thesticky
class has no effect. It seems the class is forcefully added by JS code after the page loads.minimal-mistakes-jekyll (4.24.0)
ruby:latest
Docker imageExpected behavior
The sidebar should remain non-sticky instead of being forced as sticky.
Steps to reproduce the behavior
_includes/sidebar.html
sticky
class from the div tag on line 2On screens larger than 1024px, Javascript code will add the
sticky
class back to the sidebar, making the above manipulation useless.Other
The culprit code is in file
assets/js/_main.js
, from lines 9 to 28. I do not want to override this file in my site, as it would make it unmaintainable when future theme updates are released. I am also reluctant to create my own Javascript code to counteract this function's behavior, both because I don't know about side effects and because the order in which event functions trigger is undefined.The workaround I am currently using is a CSS override to remove the effects of the
sticky
class on the sidebar (unsettingposition
andmax-height
in particular).The text was updated successfully, but these errors were encountered: