Skip to content

Commit

Permalink
Scrollable sidebar (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kallekleiv authored Sep 9, 2020
1 parent e23fb93 commit 06fd34e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
44 changes: 43 additions & 1 deletion webviz_config/static/assets/webviz_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,48 @@ div.pageWrapper.tab-content {
align-items: center;
}

.sideBar {
overflow-x: hidden;
overflow-y: scroll;
height: 100vh;
scrollbar-width: thin;
scrollbar-color: var(--menuBackground) var(--menuBackground); /* thumb and track color */
}

.sideBar:hover {
scrollbar-color: var(--menuLinkColor) var(--menuBackground); /* thumb and track color */
}

.sideBar::-webkit-scrollbar
{
width: 3px;
background-color:var(--menuBackground);
}

.sideBar::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 3px var(--menuBackground);
background-color: var(--menuBackground);
}

.sideBar:hover::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 3px var(--menuLinkBackgroundHover);

background-color: var(--menuBackground);
}

.sideBar::-webkit-scrollbar-thumb
{
background-color: var(--menuBackground);
}

.sideBar:hover::-webkit-scrollbar-thumb
{
background-color: var(--menuLinkColor);
}


/* Needed to override border for the last tab */
#last_page {border: none!important;} /* csslint allow: known-properties, important */
#logo {border: none!important;} /* csslint allow: known-properties, important */
#logo {padding:50px!important; border: none!important;max-width: 100%; height:auto;} /* csslint allow: known-properties, important */
1 change: 1 addition & 0 deletions webviz_config/templates/webviz_template.py.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ else:
app.layout = dcc.Tabs(
parent_className="layoutWrapper",
content_className="pageWrapper",
className="sideBar",
vertical=True,
children=[
{% for page in pages %}
Expand Down

0 comments on commit 06fd34e

Please sign in to comment.