mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
198 lines
3.4 KiB
CSS
198 lines
3.4 KiB
CSS
|
@import './theme';
|
||
|
@import './code';
|
||
|
|
||
|
* {
|
||
|
box-sizing: border-box;
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
:root {
|
||
|
--user-font-scale: 1rem - 16px;
|
||
|
--max-width: calc(100% - 2rem);
|
||
|
}
|
||
|
|
||
|
@media (min-width: 50em) {
|
||
|
:root {
|
||
|
--max-width: 40em;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
min-height: 100vh;
|
||
|
font-family: var(--font-body);
|
||
|
font-size: 1rem;
|
||
|
font-size: clamp(0.875rem, 0.4626rem + 1.0309vw + var(--user-font-scale), 1.125rem);
|
||
|
line-height: 1.625;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
width: 100%;
|
||
|
display: grid;
|
||
|
--gutter: 0.5rem;
|
||
|
--doc-padding: 2rem;
|
||
|
}
|
||
|
|
||
|
.layout {
|
||
|
display: grid;
|
||
|
grid-auto-flow: column;
|
||
|
grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, var(--max-width)) minmax(var(--gutter), 1fr);
|
||
|
gap: 1em;
|
||
|
}
|
||
|
|
||
|
.layout > article {
|
||
|
grid-column: 2;
|
||
|
}
|
||
|
|
||
|
nav ul {
|
||
|
list-style: none;
|
||
|
padding: 0;
|
||
|
}
|
||
|
|
||
|
/* Typography */
|
||
|
:is(h1, h2, h3, h4, h5, h6) {
|
||
|
margin-bottom: 1.38rem;
|
||
|
font-weight: 400;
|
||
|
line-height: 1.3;
|
||
|
}
|
||
|
|
||
|
:is(h1, h2) {
|
||
|
max-width: 40ch;
|
||
|
}
|
||
|
|
||
|
:is(h2, h3):not(:first-child) {
|
||
|
margin-top: 3rem;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
font-size: clamp(2.488rem, 1.9240rem + 1.4100vw, 3.052rem);
|
||
|
}
|
||
|
|
||
|
h2 {
|
||
|
font-size: clamp(2.074rem, 1.7070rem + 0.9175vw, 2.441rem);
|
||
|
}
|
||
|
|
||
|
h3 {
|
||
|
font-size: clamp(1.728rem, 1.5030rem + 0.5625vw, 1.953rem);
|
||
|
}
|
||
|
|
||
|
h4 {
|
||
|
font-size: clamp(1.44rem, 1.3170rem + 0.3075vw, 1.563rem);
|
||
|
}
|
||
|
|
||
|
h5 {
|
||
|
font-size: clamp(1.2rem, 1.1500rem + 0.1250vw, 1.25rem);
|
||
|
}
|
||
|
|
||
|
p {
|
||
|
color: var(--theme-text-light);
|
||
|
}
|
||
|
|
||
|
small, .text_small {
|
||
|
font-size: 0.833rem;
|
||
|
}
|
||
|
|
||
|
a {
|
||
|
color: var(--theme-accent);
|
||
|
font-weight: 400;
|
||
|
text-underline-offset: 0.08em;
|
||
|
text-decoration: none;
|
||
|
align-items: center;
|
||
|
gap: 0.5rem;
|
||
|
}
|
||
|
|
||
|
a > code:not([class*="language"]) {
|
||
|
position: relative;
|
||
|
color: var(--theme-accent);
|
||
|
background: transparent;
|
||
|
text-underline-offset: var(--padding-block);
|
||
|
}
|
||
|
|
||
|
a > code:not([class*="language"])::before {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
right: 0;
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
display: block;
|
||
|
background: var(--theme-accent);
|
||
|
opacity: var(--theme-accent-opacity);
|
||
|
border-radius: var(--border-radius);
|
||
|
}
|
||
|
|
||
|
a:hover,
|
||
|
a:focus {
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
|
||
|
a:focus {
|
||
|
outline: 2px solid currentColor;
|
||
|
outline-offset: 0.25em;
|
||
|
}
|
||
|
|
||
|
strong {
|
||
|
font-weight: 600;
|
||
|
color: inherit;
|
||
|
}
|
||
|
|
||
|
/* Supporting Content */
|
||
|
|
||
|
code:not([class*="language"]) {
|
||
|
--border-radius: 3px;
|
||
|
--padding-block: 0.2rem;
|
||
|
--padding-inline: 0.33rem;
|
||
|
|
||
|
font-family: var(--font-mono);
|
||
|
font-size: .85em;
|
||
|
color: inherit;
|
||
|
background-color: var(--theme-code-inline-bg);
|
||
|
padding: var(--padding-block) var(--padding-inline);
|
||
|
margin: calc(var(--padding-block) * -1) -0.125em;
|
||
|
border-radius: var(--border-radius);
|
||
|
}
|
||
|
|
||
|
pre > code:not([class*="language"]) {
|
||
|
background-color: transparent;
|
||
|
padding: 0;
|
||
|
margin: 0;
|
||
|
border-radius: 0;
|
||
|
color: inherit;
|
||
|
}
|
||
|
|
||
|
pre {
|
||
|
position: relative;
|
||
|
background-color: var(--theme-code-bg);
|
||
|
color: var(--theme-code-text);
|
||
|
--padding-block: 1rem;
|
||
|
--padding-inline: 2rem;
|
||
|
padding: var(--padding-block) var(--padding-inline);
|
||
|
padding-right: calc(var(--padding-inline) * 2);
|
||
|
margin-left: calc(50vw - var(--padding-inline));
|
||
|
transform: translateX(-50vw);
|
||
|
|
||
|
line-height: 1.414;
|
||
|
width: calc(100vw + (var(--padding-inline) * 2));
|
||
|
max-width: calc(100% + (var(--padding-inline) * 2));
|
||
|
overflow-y: hidden;
|
||
|
overflow-x: auto;
|
||
|
}
|
||
|
|
||
|
@media (min-width: 37.75em) {
|
||
|
pre {
|
||
|
--padding-inline: 1.25rem;
|
||
|
border-radius: 8px;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.flex {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
img.cover {
|
||
|
width: 100%;
|
||
|
max-height: 50vh;
|
||
|
object-fit: cover;
|
||
|
}
|