Skip to content

Commit fe61829

Browse files
authored
Merge pull request #57 from yjose/fix/fix_docs
fix sticky sidebar position
2 parents f9b577f + 8b627c7 commit fe61829

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/src/components/common/Layout/Sidebar/index.jsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ const Sidebar = ({ pages }) => {
2828
return (
2929
<>
3030
<div className="sidebar website-sidebar" key="SW">
31-
<Menu routes={routes} />
32-
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7D52QE&placement=react-popupelazizicom" id="_carbonads_js" />
31+
<div className="sticky-sidebar">
32+
<Menu routes={routes} />
33+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7D52QE&placement=react-popupelazizicom" id="_carbonads_js" />
34+
</div>
35+
3336
</div>
3437
<div className="sidebar mobile-sidebar" key="SM">
3538
<Popup

docs/src/components/common/Layout/css/sidebar.css

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
width: 250px !important;
33
padding: 20px 5px;
44
}
5-
6-
.menu {
7-
background: transparent;
5+
.sticky-sidebar{
86
position: sticky;
97
top: 20px;
8+
width: 100%;
9+
}
10+
.menu {
11+
background: transparent;
1012
display: block;
1113
padding: 0;
1214
margin-left: 0px;

0 commit comments

Comments
 (0)