Skip to content

Commit 6c9be1a

Browse files
author
jordanmccullough
committed
Resolve scroll spy menu positioning with updated layout
1 parent b206568 commit 6c9be1a

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

_stylesheets/curriculum-beta.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ html, body {
5858
.curriculum {
5959
height: 100%;
6060
width: 100%;
61+
position: relative;
6162
/* General external link */
6263
/* GitHub Links */
6364
/* GitHub Book Links, Guide Links */
@@ -152,12 +153,22 @@ html, body {
152153
font: normal normal 20px octicons; }
153154

154155
#toc-wrapper {
155-
position: fixed;
156+
position: absolute;
157+
z-index: 1000;
156158
right: 0;
157159
width: 15%;
158-
z-index: 10000; }
160+
opacity: .2;
161+
transition: all 200ms; }
162+
#toc-wrapper:hover {
163+
opacity: 1; }
159164

160165
#toc .active {
161166
font-weight: 700; }
162167
#toc .active a {
163168
color: #222222; }
169+
170+
.affix-top {
171+
position: absolute; }
172+
173+
.affix {
174+
position: fixed; }

_stylesheets/curriculum-beta.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ body{
2626

2727
.curriculum{
2828
width: 100%;
29+
position: relative;
2930

3031
h1,h2,h3,h4,h5,h6,p,ul,svg{
3132
font-weight: normal;
@@ -133,11 +134,10 @@ body{
133134
}
134135

135136
#toc-wrapper{
136-
position: fixed;
137+
position: absolute;
138+
z-index: 1000;
137139
right: 0;
138140
width: 15%;
139-
z-index: 10000;
140-
// padding: 15px 0 0 0;
141141
opacity: .2;
142142
transition: all 200ms;
143143
&:hover{
@@ -156,12 +156,12 @@ body{
156156
}
157157

158158
.affix-top{
159-
159+
position: absolute;
160160
}
161161

162162
.affix{
163+
position: fixed;
163164
}
164165

165166
.affix-bottom{
166-
167167
}

0 commit comments

Comments
 (0)