Support » Plugin: Hash Link Scroll Offset » Feature request: Allow media query settings for offset amount + more…

  • agg2

    (@agg2)



    Context of the problem: One of the commonest uses of this plugin will be to offset same-page hyperlink jumps due to a fixed menu bar at the top which needs to be compensated for, or else the anchored content will appear behind the fixed menu bar.

    Because the fixed menu itself is often responsive, its height will vary (one-line menu bar becomes two lines for smaller screens), and therefore the hash link scroll offset will need to vary accordingly also.

    Some websites also disable the fixed menu for mobile screens, and in that case, the hash link scroll offset should be disabled for mobile screens.

    Suggested solution (manually determine offset conditions): Please add a feature which allows media queries to be added to vary the offset amount (px) according to screen width. It should be possible to add as many media queries as needed.

    Extended solution (automatically determine offset conditions): Even better if you could allow users to link the offset value (px) to the height of fixed menu bar in question, by adding a plugin setting field in which users can specify the class or id of the <div> that represents the fixed menu. That way, the offset can be automatically determined by the height of the fixed menu.

    • This topic was modified 7 months ago by  agg2.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    Filed as an enhancement issue over at https://github.com/WebDevStudios/Hash-Link-Scroll-Offset/issues/17

    I can’t promise any sort of timelines for this feature, and we would love to accept PR requests if you decide to try your own implementation and contribute back to the plugin.

    agg2

    (@agg2)

    I can’t promise any sort of timelines for this feature, and we would love to accept PR requests if you decide to try your own implementation and contribute back to the plugin.

    I wish I could contribute, but I am programming-illiterate.

    Of course, I understand about the timelines. I just want to reiterate my vote for this improvement. I’m sure plugin users would greatly appreciate this functional enhancement, but only if/when you can find the time. Thank you for your efforts; a 5/5 plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature request: Allow media query settings for offset amount + more…’ is closed to new replies.