cherrykitten.dev/sass/main.scss

298 lines
3.8 KiB
SCSS
Raw Normal View History

2024-04-20 12:54:05 +00:00
@import "variables";
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
padding: 0;
2024-06-07 12:29:58 +00:00
font-family:
Monaco,
Consolas,
Ubuntu Mono,
monospace;
2024-04-20 12:54:05 +00:00
font-size: 1rem;
line-height: 1.54;
background-color: var(--background);
color: var(--color);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
@media (max-width: $phone-max-width) {
font-size: 1rem;
}
}
2024-06-07 12:29:58 +00:00
h1,
h2 {
2024-04-20 12:54:05 +00:00
display: flex;
align-items: center;
font-weight: 500;
line-height: 1.3;
color: var(--accent2);
}
2024-06-07 12:29:58 +00:00
h3,
h4,
h5,
h6 {
2024-04-20 12:54:05 +00:00
display: flex;
align-items: center;
font-weight: 400;
line-height: 0.8;
color: var(--accent3);
}
h1 {
font-size: 1.4rem;
}
h2 {
font-size: 1.3rem;
padding-top: 1rem;
border-bottom: 1px dashed var(--accent);
padding-bottom: 7px;
}
h3 {
font-size: 1.2rem;
font-weight: bolder;
}
2024-06-07 12:29:58 +00:00
h4,
h5,
h6 {
2024-04-20 12:54:05 +00:00
font-size: 1.15rem;
}
a {
color: inherit;
}
img {
display: block;
max-width: 100%;
&.left {
margin-right: auto;
}
&.center {
margin-left: auto;
margin-right: auto;
}
&.right {
margin-left: auto;
}
}
p {
margin-bottom: 20px;
}
figure {
display: table;
max-width: 100%;
margin: 25px 0;
&.left {
img {
margin-right: auto;
}
}
&.center {
img {
margin-left: auto;
margin-right: auto;
}
}
&.right {
img {
margin-left: auto;
}
}
figcaption {
font-size: 14px;
padding: 5px 10px;
margin-top: 5px;
background: var(--accent);
color: var(--background);
&.left {
text-align: left;
}
&.center {
text-align: center;
}
&.right {
text-align: right;
}
}
}
code {
font-family: monospace;
font-feature-settings: normal;
background: var(--accent-alpha-20);
padding: 1px 6px;
margin: 0 2px;
2024-06-07 12:29:58 +00:00
font-size: 0.95rem;
2024-04-20 12:54:05 +00:00
}
pre {
font-family: monospace;
padding: 20px;
2024-06-07 12:29:58 +00:00
font-size: 0.95rem;
2024-04-20 12:54:05 +00:00
overflow: auto;
2024-06-07 12:29:58 +00:00
border-top: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
2024-04-20 12:54:05 +00:00
@media (max-width: $phone-max-width) {
white-space: pre-wrap;
word-wrap: break-word;
}
code {
padding: 0;
margin: 0;
background: none;
}
}
blockquote {
border-top: 1px solid var(--accent);
border-bottom: 1px solid var(--accent);
margin: 40px 0;
padding: 25px;
@media (max-width: $phone-max-width) {
padding-right: 0;
}
&:before {
2024-06-07 12:29:58 +00:00
content: "";
2024-04-20 12:54:05 +00:00
font-family: Georgia, serif;
font-size: 3.875rem;
position: absolute;
left: -40px;
top: -20px;
}
p:first-of-type {
margin-top: 0;
}
p:last-of-type {
margin-bottom: 0;
}
p {
position: relative;
}
p:before {
2024-06-07 12:29:58 +00:00
content: ">";
2024-04-20 12:54:05 +00:00
display: block;
position: absolute;
left: -25px;
color: var(--accent);
}
}
table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
margin: 40px 0;
}
2024-06-07 12:29:58 +00:00
table,
th,
td {
2024-04-20 12:54:05 +00:00
border: none;
padding: 10px;
}
th {
color: var(--accent);
}
td {
2024-06-07 12:29:58 +00:00
border-bottom: 1px dotted var(--accent);
}
2024-04-20 12:54:05 +00:00
2024-06-07 12:29:58 +00:00
ul,
ol {
2024-04-20 12:54:05 +00:00
margin-left: 30px;
padding: 0;
li {
position: relative;
}
@media (max-width: $phone-max-width) {
margin-left: 20px;
}
}
ol ol {
list-style-type: lower-alpha;
}
.container {
display: flex;
flex-direction: column;
padding: 40px;
2024-06-07 12:29:58 +00:00
max-width: 75vw;
2024-04-20 12:54:05 +00:00
min-height: 100vh;
margin: 0 auto;
@media (max-width: $phone-max-width) {
padding: 20px;
2024-06-07 12:29:58 +00:00
max-width: 864px;
2024-04-20 12:54:05 +00:00
}
}
.content {
display: flex;
}
hr {
width: 100%;
border: none;
background: var(--border-color);
height: 1px;
}
.hidden {
display: none;
}
@media print {
.section {
break-inside: avoid-page;
padding-top: 1rem;
}
2024-06-07 12:29:58 +00:00
p,
table {
2024-04-20 12:54:05 +00:00
break-inside: avoid-page;
}
2024-05-16 10:33:43 +00:00
.noprint {
display: none;
}
2024-04-20 12:54:05 +00:00
}