1
0
em.0x45.cz/sass/style.scss

264 lines
4.3 KiB
SCSS
Raw Normal View History

2021-12-02 11:36:56 +01:00
@font-face {
font-family: spectral;
2021-12-02 13:09:11 +01:00
font-style: normal;
font-weight: 400;
src: url("/fonts/spectral-regular.woff2") format("woff2"),
url("/fonts/spectral-regular.woff") format("woff"),
url("/fonts/spectral-regular.ttf") format("truetype");
2021-12-02 11:36:56 +01:00
}
2021-12-02 13:09:11 +01:00
@font-face {
font-family: spectral;
font-style: normal;
font-weight: 700;
src: url("/fonts/spectral-bold.woff2") format("woff2"),
url("/fonts/spectral-bold.woff") format("woff"),
url("/fonts/spectral-bold.ttf") format("truetype");
}
@font-face {
font-family: spectral;
font-style: italic;
font-weight: 400;
src: url("/fonts/spectral-italic.woff2") format("woff2"),
url("/fonts/spectral-italic.woff") format("woff"),
url("/fonts/spectral-italic.ttf") format("truetype");
}
2021-12-14 20:43:32 +01:00
::selection{
background-color: #ffffb2;
color: #000;
}
2021-12-14 20:36:55 +01:00
.wrap {
max-width: 55rem;
margin: 0 auto;
padding: 0 1rem;
}
.grid {
display: grid;
grid-template-columns: 10em auto;
grid-column-gap: 2em;
/* Do not let wide blocks, such as pre, expand the column and overflow */
&>*{ min-width: 0 }
2022-11-28 15:11:08 +01:00
& nav>*:first-child,
2021-12-14 20:36:55 +01:00
& main>*:first-child,
& main>article:first-child h2
{ padding-top: 0; margin-top: 0; }
}
2021-12-02 11:36:56 +01:00
2021-12-02 11:09:43 +01:00
body {
2021-12-02 11:36:56 +01:00
font-family: spectral, serif;
text-rendering: optimizeLegibility;
2021-12-02 13:09:11 +01:00
font-size: 18px;
2021-12-02 11:09:43 +01:00
line-height: 1.5;
2021-12-14 20:36:55 +01:00
margin: 0;
2021-12-02 11:09:43 +01:00
}
header {
2021-12-14 20:36:55 +01:00
padding: 1rem 0;
margin-bottom: 5rem;
background-color: #000;
color: #fff;
line-height: 1;
2021-12-02 11:09:43 +01:00
a { color: inherit }
2021-12-14 20:36:55 +01:00
.wrap {
display: flex;
justify-content: space-between;
align-items: baseline;
}
.title { font-size: 1.5em; }
.title:hover { text-decoration: none }
2022-11-28 15:11:08 +01:00
.links { font-size: 1rem }
2021-12-02 11:09:43 +01:00
}
2022-11-28 15:11:08 +01:00
nav {
2022-12-08 10:41:49 +01:00
position: sticky;
align-self: start;
top: 2em;
2021-12-14 20:36:55 +01:00
margin-bottom: 4rem;
2021-12-02 11:09:43 +01:00
span.title {
display: block;
margin: 2em 0 1em 0;
font-weight: bold;
}
ul {
list-style-type: none;
padding: 0;
li a {
color: #000;
display: block;
padding: 0 .5em;
&:hover {
color: #fff;
background-color: #000;
text-decoration: none;
}
}
2022-06-06 23:19:09 +02:00
li.mobile-only { display: none }
2021-12-02 11:09:43 +01:00
}
}
2021-12-02 11:53:48 +01:00
main {
2022-12-04 17:27:08 +01:00
margin-bottom: 2rem;
2021-12-03 21:55:43 +01:00
2022-06-01 11:14:39 +02:00
h1, h2, h3, h4, h5, h6 {
2022-09-22 12:02:35 +02:00
margin-top: 1.5em;
padding-top: 1em;
2022-06-01 11:14:39 +02:00
line-height: 1;
}
2021-12-30 10:30:27 +01:00
article h2 { margin-top: 1em }
2021-12-04 22:05:33 +01:00
article h2 a { color: inherit }
2021-12-14 20:36:55 +01:00
2021-12-03 21:55:43 +01:00
.info {
2022-12-08 18:44:57 +01:00
border-top: 1px solid #ccc;
2022-12-04 17:27:08 +01:00
margin-top: 2em;
2021-12-03 21:55:43 +01:00
padding: 1em 0;
2021-12-04 18:05:15 +01:00
ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
font-size: .85em;
li { margin-right: 1em }
}
2021-12-03 21:55:43 +01:00
}
2021-12-14 20:36:55 +01:00
2022-12-04 17:27:08 +01:00
.updates ul {
margin-top: .5em;
padding: 0;
list-style-type: none;
}
2021-12-03 21:55:43 +01:00
img {
max-width: 100%;
box-sizing: border-box;
border: 1px solid #bbb;
border-radius: .2rem;
padding: .2rem;
& + em {
display: block;
text-align: center;
}
}
2021-12-14 20:36:55 +01:00
2021-12-03 21:55:43 +01:00
table {
2024-01-19 09:09:22 +01:00
display: flex;
flex-direction: column;
margin: 1.25em 0;
2021-12-03 21:55:43 +01:00
text-align: left;
overflow: auto;
2021-12-03 21:55:43 +01:00
2024-01-19 09:09:22 +01:00
td, th { padding-right: 2em }
2021-12-03 21:55:43 +01:00
}
2021-12-14 20:36:55 +01:00
2021-12-03 21:55:43 +01:00
blockquote {
2022-09-09 16:27:58 +02:00
margin: 1em 0;
2022-09-09 09:55:14 +02:00
background-color: #f5f5f5;
2021-12-03 21:55:43 +01:00
p {
2022-09-09 16:27:58 +02:00
border-left: .3em solid #729fcf;
2022-09-09 09:55:14 +02:00
padding: 1em 1.5em;
2021-12-02 12:08:48 +01:00
}
}
2021-12-14 20:36:55 +01:00
code { font-size: 14px }
li>code { word-wrap: break-word }
2021-12-03 22:28:16 +01:00
p>code {
background-color: #383838;
color: #e6e1dc;
2022-04-24 11:23:25 +02:00
padding: .2em .5em;
2021-12-03 22:28:16 +01:00
border-radius: .3em;
}
2021-12-14 20:36:55 +01:00
2021-12-03 22:28:16 +01:00
pre {
padding: 1em;
overflow: auto;
border-radius: .3em;
}
2021-12-14 20:36:55 +01:00
2021-12-04 22:05:33 +01:00
input.search {
display: none; // Hide for non-js browsers
box-sizing: border-box;
width: 100%;
2022-12-08 18:44:57 +01:00
border: 1px solid #ccc;
2022-12-18 18:46:30 +01:00
padding: .4rem .9rem;
2021-12-04 22:05:33 +01:00
margin: 1em 0;
outline: none;
2022-12-08 18:44:57 +01:00
background-color: inherit;
color: inherit;
font-family: spectral, serif;
2022-12-18 18:46:30 +01:00
font-size: 1rem;
2021-12-04 22:05:33 +01:00
}
2024-05-06 12:24:42 +02:00
.all-posts { text-align: right }
2021-12-02 11:53:48 +01:00
}
2021-12-02 11:09:43 +01:00
a {
text-decoration: none;
2022-11-28 14:42:40 +01:00
color: #e1140a;
2021-12-02 11:09:43 +01:00
&:hover { text-decoration: underline }
}
2021-12-02 13:13:18 +01:00
2021-12-14 20:36:55 +01:00
@media screen and (max-width: 50rem) {
2022-06-06 23:19:09 +02:00
2021-12-14 20:36:55 +01:00
.grid { grid-template-columns: auto }
2022-06-06 23:19:09 +02:00
2022-11-28 15:11:08 +01:00
nav {
2022-12-08 10:41:49 +01:00
position: initial;
2022-06-06 23:19:09 +02:00
ul { display: none }
2022-11-28 15:11:08 +01:00
ul.main {
2022-06-06 23:19:09 +02:00
display: flex;
justify-content: center;
flex-wrap: wrap;
}
ul li.mobile-only { display: list-item }
span.title { display: none }
}
2022-11-28 15:11:08 +01:00
header, nav { margin-bottom: 3rem }
2021-12-02 13:13:18 +01:00
}
2022-11-28 14:42:40 +01:00
@media (prefers-color-scheme: dark) {
body {
background-color: #131516;
color: #cdcdcd;
}
header {
background-color: inherit;
color: inherit;
}
2022-11-28 15:11:08 +01:00
nav ul li a {
2022-11-28 14:42:40 +01:00
color: inherit;
&:hover {
color: #131516;
background-color: #cdcdcd;
}
}
main {
.info, input.search { border-color: #383838 }
img { border-color: #43494c }
blockquote { background-color: #383838 }
2022-11-28 14:42:40 +01:00
}
a {
color: #ff6e67;
}
}