mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Move heading anchors 50px up to avoid nav bar
Fixes #447. We do this by moving the actual anchored element up in the page without moving the actual text. (Apple uses a similar trick in their framed docs.) Now this looks a bit sillier on smaller screens but it's better overall.
This commit is contained in:
committed by
Paul O’Shannessy
parent
92ce80cf4f
commit
b21cdac9e3
@@ -11,7 +11,7 @@ class Redcarpet::Render::HTML
|
||||
.gsub(/\s+/, "-")
|
||||
.gsub(/[^A-Za-z0-9\-_.]/, "")
|
||||
|
||||
return "<h#{level} id=\"#{clean_title}\"><a href=\"##{clean_title}\">#{title}</a></h#{level}>"
|
||||
return "<h#{level} id=\"#{clean_title}\" class=\"anchor\"><a href=\"##{clean_title}\">#{title}</a></h#{level}>"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user