Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anchors around all headers in the content. #79

Merged
merged 2 commits into from
Dec 28, 2015

Conversation

asolove
Copy link
Contributor

@asolove asolove commented Dec 27, 2015

This is one way to address #72, creating anchors for sections in the text.

  • Just uses the header's text as its anchor name. Spaces in the names work fine in URLs. In the browsers I tested, scrolling to the anchor in the URL works even when the anchor is added after the DOM loads.
  • Adjust theme css to only style links, not tags used as anchors.

- Just uses the header's text as its anchor name. Spaces work. Scrolling to the anchor works even when the anchor is added after the dom loads.
- Adjust theme css to only style links, not <a> tags used as anchors.
@azerupi
Copy link
Contributor

azerupi commented Dec 27, 2015

You changed the CSS file directly, but I use stylus (css pre-processor) to have more modular stylesheets. The stylesheet is added to the git repo so that people don't have to install node.js to regenerate it.

Would you mind editing the stylus files instead?

scrolling to the anchor in the URL works even when the anchor is added after the DOM loads.

I never thought that would work, but if it does, everything else is good. I will merge once you change the stylus files 😉

@asolove
Copy link
Contributor Author

asolove commented Dec 27, 2015

Oh, hah, didn't even see them. Yeah, I'll update this a little later today.

@azerupi
Copy link
Contributor

azerupi commented Dec 27, 2015

Sure I will merge it tomorrow morning then (time-zone difference UTC+01:00 here 😉 )

@steveklabnik
Copy link
Member

🎊

@azerupi
Copy link
Contributor

azerupi commented Dec 28, 2015

Perfect, merging now!

azerupi added a commit that referenced this pull request Dec 28, 2015
Add anchors around all headers in the content.
@azerupi azerupi merged commit f9b6e09 into rust-lang:master Dec 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants