js/page/style.css

221 lines
3.6 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');
:root {
font-family: sans-serif;
--color-bg: #eef0f2;
--color-fg: #222;
--color-ac: hsl(274deg 100% 90%);
--color-hl: hsl(274deg 100% 70%);
--line-mid: .14rem;
--line-thick: .2rem;
color: var(--color-fg);
}
* {
box-sizing: border-box;
}
body {
background: var(--color-bg);
display: flex;
flex-flow: column;
align-items: center;
padding: 1em 2em;
color: #333;
background: var(--color-bg);
}
body>section {
width: 100%;
max-width: 60em;
margin-top: 1em;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Raleway', sans-serif;
font-weight: normal;
}
h2 {
padding: 0 1em 0 .2em;
width: max-content;
border-bottom: .1em solid var(--color-ac);
}
h3::before {
content: "\2023";
margin-right: .6ch;
color: var(--color-ac);
}
em {
font-style: normal;
font-weight: bold;
}
hr {
all: unset;
width: 100%;
border-bottom: .2em solid var(--color-ac);
grid-column: 1 / -1;
margin: 1em 0;
}
a.fancy {
--color-primary: var(--color-hl);
--color-secondary: white;
--color-shadow: #0004;
color: var(--color-primary);
cursor: pointer;
display: inline-block;
font-weight: bold;
padding: .0em .2em;
position: relative;
text-decoration: none;
transition: all .3s;
}
a.fancy::before {
content: '';
display: block;
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: .1em;
background: var(--color-primary);
transition: all .3s;
z-index: -1;
}
a.fancy:hover {
color: var(--color-secondary);
text-shadow: .2em .3em .2em var(--color-shadow);
}
a.fancy:hover::before {
height: 100%;
border-radius: .2em;
}
pre>code {
display: block;
border-left: dashed var(--line-mid) var(--color-ac);
padding-left: 1.6em;
}
span[title] {
cursor: help;
border-bottom: dotted currentcolor .16em;
}
code-block:not(:defined) {
font-family: monospace;
white-space: pre-line;
}
dl, dt, dd { all: unset; }
dt, dd { display: block; }
dl {
display: flex;
flex-flow: column;
}
dt {
font-weight: bold;
font-style: italic;
}
dl>*+dt { margin-top: .8em; }
dl>dt+* { margin-top: .6em; }
dl>*+* { margin-top: .4em; }
code { font-size: 1.1em; }
dl>code dt, dl>code dd { all: unset;}
dl>code dt::after { content: '\00A0:\00A0';}
dl>code {
display: grid;
grid-template-columns: auto 1fr;
}
dl>code>dt~dd { grid-column: 2/2; }
.columns {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.4em;
}
.columns>* {
margin: 0;
flex: 100%;
}
.all-unset { all: unset; }
.full-width { grid-column: 1/-1; }
table-of-contents ul {
list-style: none;
padding: 0;
}
table-of-contents ul li::before {
content: "\2023";
color: var(--color-hl);
margin-right: 1ch;
}
a.back {
--margin: .6em;
color: var(--color-hl);
text-decoration: none;
padding: .2em;
padding-top: .3em;
padding-right: .4em;
position: absolute;
top: var(--margin);
left: var(--margin);
border-radius: .3em;
}
a.back:hover {
color: white;
background: var(--color-hl);
}
a.back::before {
display: inline-block;
content: '';
width: 0;
height: 0;
border: solid transparent .4em;
border-color: transparent currentcolor transparent transparent;
margin-right: .8em;
transform: scale(2, 1);
}
.ribbon {
--color: var(--color-hl);
left: 0;
top: 0;
position: fixed;
transform: rotate(315deg) translate(-5.4em);
background-color: var(--color);
border: .16em dashed #ffffff;
color: #ffffff;
font-family: sans-serif;
font-size: .8rem;
letter-spacing: .1em;
line-height: 1.4em;
padding: .2em 5em;
text-decoration: none;
white-space: nowrap;
box-shadow:
0 0 0 3px var(--color),
0 0 20px -3px rgba(0, 0, 0, 0.5);
text-shadow:
0 0 0 #ffffff,
0 0 5px rgba(0, 0, 0, 0.3);
}