adjust sidebar-styles of docs and examples

pull/2642/head
Achim Vedam 7 years ago
parent 9f82d67af1
commit 610f8373eb

@ -48,19 +48,12 @@
a { a {
position: relative; position: relative;
opacity: 0.75; transition: color 0.2s;
transition: opacity 0.2s;
border-bottom: none; border-bottom: none;
padding: 0; padding: 0;
color: var(--second); color: var(--second);
} }
@media (min-width: 832px) {
a {
color: white;
}
}
.section { .section {
display: block; display: block;
padding: 0 0 .8rem 0; padding: 0 0 .8rem 0;
@ -78,22 +71,33 @@
} }
.section:hover, .section:hover,
.subsection:hover { .subsection:hover,
.active {
color: var(--flash); color: var(--flash);
opacity: 1
} }
.subsection[data-level="4"] { .subsection[data-level="4"] {
padding-left: 1.2rem; padding-left: 1.2rem;
} }
.active { opacity: 1 }
.icon-container { .icon-container {
position: absolute; position: absolute;
top: -.2rem; top: -.2rem;
right: 2.4rem; right: 2.4rem;
} }
@media (min-width: 832px) {
a {
color: var(--sidebar-text);
}
a:hover,
.section:hover,
.subsection:hover,
.active {
color: white
}
}
</style> </style>
<ul <ul

@ -22,7 +22,7 @@
.section-title { .section-title {
display: block; display: block;
padding: 0 0 .8rem 0; padding: 0 0 0.8rem 0;
font: 400 var(--h6) var(--font); font: 400 var(--h6) var(--font);
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.12em; letter-spacing: 0.12em;
@ -32,7 +32,7 @@
a { a {
display: flex; display: flex;
position: relative; position: relative;
color: white; color: var(--sidebar-text);
border-bottom: none; border-bottom: none;
padding: 0.2rem 3rem; padding: 0.2rem 3rem;
margin: 0 -3rem; margin: 0 -3rem;
@ -42,17 +42,19 @@
} }
a:hover { a:hover {
color: var(--flash); color: white;
} }
a.active { a.active {
background: rgba(255, 255, 255, 0.1) calc(100% - 3rem) 50% no-repeat url(/icons/arrow-right.svg); background: rgba(0, 0, 0, 0.15) calc(100% - 3rem) 50% no-repeat
url(/icons/arrow-right.svg);
background-size: 1em 1em; background-size: 1em 1em;
color: white; color: white;
} }
a.active.loading { a.active.loading {
background: rgba(255, 255, 255, 0.1) calc(100% - 3rem) 50% no-repeat url(/icons/loading.svg); background: rgba(0, 0, 0, 0.1) calc(100% - 3rem) 50% no-repeat
url(/icons/loading.svg);
background-size: 1em 1em; background-size: 1em 1em;
color: white; color: white;
} }
@ -86,7 +88,7 @@
class="thumbnail" class="thumbnail"
alt="{example.title} thumbnail" alt="{example.title} thumbnail"
src="examples/thumbnails/{example.slug}.jpg" src="examples/thumbnails/{example.slug}.jpg"
> />
<span>{example.title}</span> <span>{example.title}</span>
</a> </a>

Loading…
Cancel
Save