Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01b40d8

Browse files
committed
Move header link styling out of documentation only
It's used in blog posts too. I also constrained it to just the anchor class to avoid any other headers we have.
1 parent 67d0f15 commit 01b40d8

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

docs/_css/react.scss

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ li {
7474
margin-left: 20px;
7575
}
7676

77+
// Make header navigation linkable and on the screen. Used in documentation and
78+
// blog posts.
79+
h1, h2, h3, h4, h5, h6 {
80+
&.anchor {
81+
position: relative;
82+
top: -$navHeight;
83+
> a {
84+
color: $darkTextColor;
85+
position: relative;
86+
top: $navHeight;
87+
88+
&:hover {
89+
text-decoration: underline;
90+
}
91+
}
92+
}
93+
}
94+
7795
// Main Nav
7896

7997
.nav-main {
@@ -392,22 +410,6 @@ section.black content {
392410
font-size: 24px;
393411
}
394412

395-
h1, h2, h3, h4, h5, h6 {
396-
&.anchor {
397-
position: relative;
398-
top: -$navHeight;
399-
}
400-
401-
> a {
402-
color: $darkTextColor;
403-
position: relative;
404-
top: $navHeight;
405-
406-
&:hover {
407-
text-decoration: underline;
408-
}
409-
}
410-
}
411413

412414
// H2s form documentation topic dividers. Extra space helps.
413415
h2 {

0 commit comments

Comments
 (0)