codrops-scribbler/scribbler-doc.css

120 lines
1.6 KiB
CSS
Raw Normal View History

2018-01-12 17:31:18 +03:00
html, body {
2022-11-14 19:54:45 +03:00
display: flex;
flex-direction: column;
min-height: 100vh;
2018-01-12 17:31:18 +03:00
}
2022-10-12 22:50:21 +03:00
p {
2022-11-14 19:54:45 +03:00
line-height: 1.5rem;
2022-10-12 22:50:21 +03:00
}
2018-01-12 17:31:18 +03:00
/* layout */
.header {
2022-11-14 19:54:45 +03:00
border-bottom: 1px solid var(--code-bg-color);
grid-template-columns: 1fr 150px 60% 1fr;
2018-01-12 17:31:18 +03:00
}
.wrapper {
2022-11-14 19:54:45 +03:00
display: flex;
flex-grow: 1;
2018-01-12 17:31:18 +03:00
}
/* logo */
.logo {
2022-11-14 19:54:45 +03:00
font-weight: 700;
color: var(--primary-color);
font-size: 1.4em;
grid-column: 2;
2018-01-12 17:31:18 +03:00
}
.logo__thin {
2022-11-14 19:54:45 +03:00
font-weight: 300;
2018-01-12 17:31:18 +03:00
}
/* menu */
.menu {
2022-11-14 19:54:45 +03:00
grid-template-columns: 1fr 180px 60% 1fr;
2018-01-12 17:31:18 +03:00
}
.menu__item {
2022-11-14 19:54:45 +03:00
padding: 1.5rem 1rem;
2018-01-12 17:31:18 +03:00
}
/* doc */
.doc__bg {
2022-11-14 19:54:45 +03:00
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 28%;
background-color: var(--bg-color);
z-index: -1;
2018-01-12 17:31:18 +03:00
}
.doc__nav {
2022-11-14 19:54:45 +03:00
flex-basis: 20%;
font-weight: 400;
2018-01-12 17:31:18 +03:00
}
.doc__nav ul {
2022-11-14 19:54:45 +03:00
list-style: none;
padding-left: 0;
line-height: 1.8;
2018-01-12 17:31:18 +03:00
}
.doc__nav ul.fixed {
2022-11-14 19:54:45 +03:00
position: fixed;
top: 2rem;
2018-01-12 17:31:18 +03:00
}
.doc__nav li:hover {
2022-11-14 19:54:45 +03:00
color: var(--primary-color-light);
cursor: pointer;
transition: color .3s ease-in-out;
2018-01-12 17:31:18 +03:00
}
.doc__nav .selected {
2022-11-14 19:54:45 +03:00
color: var(--accent-color);
position: relative;
2018-01-12 17:31:18 +03:00
}
.doc__nav .selected:after {
2022-11-14 19:54:45 +03:00
position: absolute;
content: "";
width: 1rem;
height: 1rem;
background-color: var(--accent-color);
left: -1.5rem;
top: 0.3rem;
2018-01-12 17:31:18 +03:00
}
.doc__content {
2022-11-14 19:54:45 +03:00
flex-basis: 80%;
padding: 0 0 5rem 1rem;
2018-01-12 17:31:18 +03:00
}
@media (max-width: 750px) {
2022-11-14 19:54:45 +03:00
.wrapper {
flex-direction: column;
}
.doc__content {
padding-left: 0;
}
.doc__nav ul {
border-bottom: 1px solid var(--code-bg-color);
padding-bottom: 0.5rem;
}
.doc__nav ul.fixed {
/* nutralized the fixed menu for mobile*/
position: relative;
top: 0;
}
.doc__nav li {
display: inline-block;
padding-right: 1rem;
}
.doc__nav .selected:after {
display: none;
}
}