Skip to content

If site's title is very long, then some content is hidden #867

Answered by markdumay
hawkeye116477 asked this question in Help
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hawkeye116477
Comment options

@markdumay
Comment options

Answer selected by hawkeye116477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants