foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.64k stars 5.5k forks source link

[6.4 RC1] data-offset not working in smooth scroll #10121

Closed rafibomb closed 7 years ago

rafibomb commented 7 years ago

Adding data-offset does not offset page - example:

<ul class="menu align-center" data-smooth-scroll data-offset="50">
  <li><a href="#setup">Setup</a></li>
  <li><a href="#javascript-reference">Javascript Reference</a></li>
</ul>
IamManchanda commented 7 years ago

cc @denisahac @kball

denisahac commented 7 years ago

Is the issue present in develop branch, or the 6.4.0-rc1 tag? Which of the two should I test it against?

IamManchanda commented 7 years ago

Though i dont know as i didnt tested it @rafibomb did ... but i guess yes present in develop! As develop is updated to 6.4.0 RC3 aka the latest! @denisahac

denisahac commented 7 years ago

Tested against v6.4.0-rc3 adding data-offset on SmoothScroll module is working as expected.

Also, I'd suggest, that on the documentation right sidebar magellan navigation, we should increase the data-offset; as you click on the link section, the title of the page section is covered by the Search bar. Adding data-offset="100" solves the usability issue.

kball commented 7 years ago

From what I'm seeing it looks like this is resolved... closing, please reopen if you're still seeing problems.

MauriceBuiten commented 7 years ago

For Magellan you need to set: data-bar-offset="50" for it to work. not data-offset... That is why its not working

leo3po commented 6 years ago

Please update the documentation https://foundation.zurb.com/sites/docs/magellan.html

denisahac commented 6 years ago

@MauriceBuiten @leo3po we've renamed the bar-offset to just offset to simplify the name; see Magellan defaults.