If site's title is very long, then some content is hidden #867
-
It's similar case as mentioned at: https://stackoverflow.com/questions/14735274/bootstrap-css-hides-a-portion-of-a-container-below-navbar-navbar-fixed-top. That happens only for mobile devices. To reproduce
ScreenshotsAdditional contextI added this code to my script to fix that:
but maybe someone knows better solution. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for sharing your example @hawkeye116477! Personally, I try to avoid the use of (critical) JavaScript, as it tends to negatively impact page load times. Additionally, your code example does not adjust the scroll offset properly. For example, see the result when using "On this page" while visiting https://demo.gethinode.com/en/blog/bootstrap-elements/ on a small screen. An alternative approach could be to use a dynamic offset variable in CSS. The offset is different pending the size of the navbar (which is a breakpoint that toggles the collapse behavior). I've submitted an example to the To reproduce, use the following commands from the command line (using npm): git clone https://github.com/gethinode/hinode.git -b offset offset
cd offset
npm i Alter the following parameter in title = "A very long site title that hides some content" Additionally, adjust the following variables in [navigation]
logo = ""
# logo = "/img/logo_icon.svg"
offset = "5.5rem"
# offsetXS is a new variable
offsetXS = "8.5rem" Run a local site: npm run start:example |
Beta Was this translation helpful? Give feedback.
Thanks for sharing your example @hawkeye116477! Personally, I try to avoid the use of (critical) JavaScript, as it tends to negatively impact page load times. Additionally, your code example does not adjust the scroll offset properly. For example, see the result when using "On this page" while visiting https://demo.gethinode.com/en/blog/bootstrap-elements/ on a small screen.
An alternative approach could be to use a dynamic offset variable in CSS. The offset is different pending the size of the navbar (which is a breakpoint that toggles the collapse behavior). I've submitted an example to the
offset
branch, happy to hear your thoughts!To reproduce, use the following commands from the com…