fix(docs): rehaul styling (#893)

* fix: adapt styling to marketing, console

* side icon margin
This commit is contained in:
Max Peintner 2020-10-22 17:09:08 +02:00 committed by GitHub
parent 457bfb4768
commit d71eb25dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 35 deletions

View File

@ -177,7 +177,7 @@
} }
.sidebar { .sidebar {
padding: var(--top-offset) 0 6.4rem 3.2rem; padding: var(--top-offset) 0 6.4rem 0;
font-family: var(--font); font-family: var(--font);
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
@ -204,7 +204,7 @@
margin-top: 4rem; margin-top: 4rem;
padding: 2rem 1.6rem 4rem 0.2rem; padding: 2rem 1.6rem 4rem 0.2rem;
border-top: var(--border-w) solid #6767785b; /* based on --second */ border-top: var(--border-w) solid #6767785b; /* based on --second */
color: var(--text); color: var(--heading);
line-height: 1; line-height: 1;
font-size: var(--h3); font-size: var(--h3);
letter-spacing: 0.05em; letter-spacing: 0.05em;
@ -267,7 +267,7 @@
.content :global(h3 > code) { .content :global(h3 > code) {
margin: 2.0rem 0 0 0; margin: 2.0rem 0 0 0;
padding: 2rem 1.6rem 2.0rem 0.2rem; padding: 2rem 1.6rem 2.0rem 0.2rem;
color: var(--text); color: var(--heading);
border-top: var(--border-w) solid #6767781f; /* based on --second */ border-top: var(--border-w) solid #6767781f; /* based on --second */
background: transparent; background: transparent;
line-height: 1; line-height: 1;
@ -291,7 +291,7 @@
font-family: inherit; font-family: inherit;
font-weight: 500; font-weight: 500;
font-size: 2.4rem; font-size: 2.4rem;
color: var(--text); color: var(--heading);
margin: 2.0rem 0 1.6rem 0; margin: 2.0rem 0 1.6rem 0;
padding-left: 0; padding-left: 0;
background: transparent; background: transparent;
@ -383,13 +383,14 @@
} }
section :global(blockquote) { section :global(blockquote) {
color: #e91e63; color: #85d996;
border: 2px solid var(--flash); border: 2px solid var(--grey-text);
background: #2a2f45;
} }
section :global(blockquote) :global(code) { section :global(blockquote) :global(code) {
background: hsl(204, 100%, 95%) !important; /* background: hsl(204, 100%, 95%) !important; */
color: #e91e63; color: var(--prime);
} }
</style> </style>

View File

@ -57,7 +57,7 @@
.section { .section {
display: block; display: block;
padding: 0 0 .8rem 0; padding: .8rem 0 .8rem 0;
font-size: var(--h6); font-size: var(--h6);
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.1em; letter-spacing: 0.1em;
@ -65,28 +65,42 @@
} }
.subsection { .subsection {
display: block; display: block;
font-size: 1.6rem; font-family: var(--font);
font-family: var(--font); font-size: 14px;
padding: 0 0 0.6em 0; padding: 0.4em 0 0.4em 0;
} color: #a3acb9;
}
.section,
.subsection {
border-top-right-radius: 50vw;
border-bottom-right-radius: 50vw;
padding-left: 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.section:hover, .section:hover,
.subsection:hover, .subsection:hover,
.active { .active {
color: var(--flash); color: var(--flash);
font-weight: 500; font-weight: 500;
color: #6c8eef;
background-color: rgba(82,130,193,.1);
padding-right: 1rem;
} }
.subsection[data-level="4"] { .subsection[data-level="4"] {
padding-left: 1.2rem; padding-left: 3.2rem;
} }
.icon-container { .icon-container {
position: absolute; margin-right: 1rem;
top: -.2rem; margin-left: .5rem;
right: 2.4rem; color: white;
} }
@media (min-width: 832px) { @media (min-width: 832px) {
a { a {
@ -99,7 +113,7 @@
.active { .active {
color: #5282c1; color: #5282c1;
} }
} }
</style> </style>
<ul <ul

View File

@ -6,7 +6,7 @@
max-width: 120rem; max-width: 120rem;
} }
section :global(h3) { section :global(h3) {
color: var(--text); color: var(--heading);
} }
</style> </style>

View File

@ -18,6 +18,7 @@
position: absolute; position: absolute;
top: 80px; top: 80px;
height: 60vh; height: 60vh;
max-height: 500px;
right: 0; right: 0;
} }
.section { .section {

View File

@ -31,18 +31,19 @@
/* theme vars */ /* theme vars */
.theme-default { .theme-default {
--back: #212224; --back: #1a1f36;
--back-light: transparent; --back-light: transparent;
--back-api: #212224; --back-api: #1a1f36;
--prime: #5282c1; --prime: #5282c1;
--second: #e91e63; --second: #ff2069;
--flash: #72a2e0; --flash: #72a2e0;
--nav-back: #212224; --nav-back: #1a1f36;
--side-nav-back: #212224; --side-nav-back: #1a1f36;
--heading: #e8eaed; --heading: #f7fafc;
--text: #eff8ff; --text: #c1c9d2;
--grey-text: #a3acb9;
--dark-text: #8795a1; --dark-text: #8795a1;
--sidebar-text: #eff8ff; --sidebar-text: #eff8ff;
--border-w: .3rem; /* border-width */ --border-w: .3rem; /* border-width */
@ -52,13 +53,13 @@
/* typo vars */ /* typo vars */
.typo-default { .typo-default {
--code-fs: 1.3rem; --code-fs: 1.3rem;
--h6: 1.4rem; --h6: 1.3rem;
--h5: 1.6rem; --h5: 1.6rem;
--h4: 1.8rem; /* default font-size */ --h4: 1.6rem; /* default font-size */
--h3: 2.6rem; --h3: 2.5rem;
--h2: 3rem; --h2: 3rem;
--h1: 3.2rem; --h1: 3rem;
--linemax: 42em; /* max line-length */ --linemax: 50em; /* max line-length */
--lh: 1.5; /* base line-height */ --lh: 1.5; /* base line-height */
} }
@ -135,7 +136,7 @@ h6,
blockquote { blockquote {
position: relative; position: relative;
margin: 0; margin: 0;
color: var(--heading); color: var(--heading);
} }
/* h1, h2, h3, h4, h5, h6 { font-weight: 600 } */ /* h1, h2, h3, h4, h5, h6 { font-weight: 600 } */
@ -354,7 +355,7 @@ a.no-underline {
.listify ul > li:before { .listify ul > li:before {
content: ''; content: '';
position: absolute; position: absolute;
margin-top: 1.1rem; margin-top: .9rem;
margin-left: -1.8rem; margin-left: -1.8rem;
background-color: var(--second); background-color: var(--second);
width: .6rem; width: .6rem;