consistent sidebar tutorial

- added css-var for light sidebar-text for easy handling
- provide higher contrast for better readability in code and blockquotes
- push SHOW ME with higher contrast (on dark instead on white)
pull/2642/head
Achim Vedam 7 years ago
parent e73084b6af
commit 2d7916d546

@ -151,7 +151,7 @@
height: 100%; height: 100%;
border-right: 1px solid var(--second); border-right: 1px solid var(--second);
background-color: var(--second); background-color: var(--second);
color: white; color: var(--sidebar-text);
} }
.chapter-markup { .chapter-markup {
@ -165,7 +165,8 @@
margin: 4rem 0 1.6rem 0; margin: 4rem 0 1.6rem 0;
font-size: var(--h3); font-size: var(--h3);
line-height: 1; line-height: 1;
color: white; font-weight: 400;
color: var(--sidebar-text);
} }
.chapter-markup :global(h2:first-child) { .chapter-markup :global(h2:first-child) {
@ -173,16 +174,21 @@
} }
.chapter-markup :global(a) { .chapter-markup :global(a) {
color: var(--sidebar-text);
}
.chapter-markup :global(a:hover) {
color: white; color: white;
} }
.chapter-markup :global(ul) { .chapter-markup :global(ul) {
padding: 0 0 0 2em; padding: 0 0 0 2em;
} }
.chapter-markup :global(blockquote) { .chapter-markup :global(blockquote) {
background-color: rgba(255,255,255,.1); background-color: rgba(0,0,0,.17);
color: white; color: var(--sidebar-text);
} }
.chapter-markup::-webkit-scrollbar { .chapter-markup::-webkit-scrollbar {
@ -198,22 +204,22 @@
.chapter-markup :global(p) > :global(code), .chapter-markup :global(p) > :global(code),
.chapter-markup :global(ul) :global(code) { .chapter-markup :global(ul) :global(code) {
color: white; color: var(--sidebar-text);
background: rgba(255,255,255,.1); background: rgba(0,0,0,.12);
padding: .2em .4em; padding: .2em .4em .3em;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
top: -0.1em; top: -0.1em;
} }
.controls { .controls {
border-top: 1px solid rgba(255,255,255,.1); border-top: 1px solid rgba(0,0,0,.25);
padding: 1em 0 0 0; padding: 1em 0 0 0;
display: flex; display: flex;
} }
.show { .show {
background: rgba(255,255,255,.1); background: rgba(0,0,0,.4);
padding: .2em .7em .3em; padding: .2em .7em .3em;
border-radius: var(--border-r); border-radius: var(--border-r);
top: .1em; top: .1em;
@ -223,22 +229,17 @@
} }
.show:hover { .show:hover {
background: rgba(255,255,255,.2); background: rgba(0,0,0,.65);
color: white;
} }
a.next { a.next {
/* border-bottom: none; */
padding-right: 1.2em; padding-right: 1.2em;
background: no-repeat 100% 50% url(/icons/arrow-right.svg); background: no-repeat 100% 50% url(/icons/arrow-right.svg);
background-size: 1em 1em; background-size: 1em 1em;
margin-left: auto; margin-left: auto;
} }
a.next:hover {
/* border-bottom: 2px solid currentColor; */
/* text-decoration: underline; */
}
.improve-chapter { .improve-chapter {
padding: 1em 0 .5em 0; padding: 1em 0 .5em 0;
} }

@ -46,6 +46,7 @@
--flash: #40b3ff; --flash: #40b3ff;
--heading: var(--second); --heading: var(--second);
--text: #444; --text: #444;
--sidebar-text: rgba(255, 255, 255, .75);
--border-w: .3rem; /* border-width */ --border-w: .3rem; /* border-width */
--border-r: .4rem; /* border-radius */ --border-r: .4rem; /* border-radius */
} }

Loading…
Cancel
Save