Skip to content
Snippets Groups Projects

Sidebar

Merged Aleksandrs Rebriks requested to merge sidebar into main
3 files
+ 135
46
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 69
0
.sidebar {
position: fixed;
top: 50%;
right: 0;
width: 70px;
height: 350px;
margin-top: -175px;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 20px;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
-webkit-transition: width 300ms;
-moz-transition: width 300ms;
-ms-transition: width 300ms;
-o-transition: width 300ms;
transition: width 300ms;
}
.sidebar .sidebar-chapter__text {
display: none;
/* text */
text-decoration: none;
color: white;
font-size: large;
-webkit-transition: color 300ms;
-moz-transition: color 300ms;
-ms-transition: color 300ms;
-o-transition: color 300ms;
transition: color 300ms;
}
/* Hover on chapter text */
.sidebar .sidebar-chapter__text:hover {
color:rgba(0, 0, 0, 0.6);
}
.sidebar .sidebar-default__text {
/* text */
text-decoration: none;
color: white;
font-size: large;
}
/* Sliding behaviour */
/*
TODO
- Check smooth scrolling on Safari.
- Check smooth scrolling on Mozilla firefox.
*/
.sidebar:hover {
width: 170px;
}
.sidebar .sidebar-chapter__text {
display: none;
}
.sidebar:hover .sidebar-default__text {
display: none;
}
.sidebar:hover .sidebar-chapter__text {
display: inline;
}
Loading