my-website/static/css/general.css

155 lines
2.2 KiB
CSS

* {
padding: 0;
margin: 0;
border: none;
border-collapse: collapse;
box-sizing: border-box;
}
body {
font-family: monospace;
max-width: 100vw;
}
header, footer {
text-align: center;
}
header {
padding-bottom: 1rem;
}
footer {
padding-top: 1rem;
}
.globalnav{
display: flex;
flex-wrap: wrap;
flex-direction: row;
text-align: center;
gap: max(1px, 0.1rem);
}
.globalnav-element {
display: block;
background-color: #ddd;
text-align: center;
flex-basis: 0;
flex-grow: 1;
min-width: fit-content;
min-height: fit-content;
padding: 0.5rem 0;
}
/* Code Blocks */
pre {
padding: 0.75rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
margin-left: auto;
margin-right: auto;
width: 100%;
max-width: max-content;
overflow-y: auto;
line-break: strict;
}
/* Inline keywords/code */
code {
display: inline-block;
color: green;
line-break: strict;
}
p {
padding: 0.5rem;
}
article {
padding: 0.5rem;
}
h2 {
margin-bottom: 1rem;
}
#mainarticle {
width: max-content;
max-width: min(80rem, 100%);
margin: 0 auto;
}
li, ul, ol {
margin: 1rem;
}
hr {
border-style: inset;
border-width: 1px;
margin: 0.5rem 0;
}
table {
display: block;
border-collapse: collapse;
margin: 1rem auto;
width: max-content;
max-width: 100%;
overflow-y: auto;
}
td, th {
border-style: solid;
border-color: black;
border-collapse: collapse;
padding: 0.5rem;
}
@media (max-width: 20rem), (max-width: 300px) {
* {
word-wrap: break-word;
}
}
@media (prefers-color-scheme: dark) {
html {
background-color: #111;
color: white;
}
.globalnav-element {
background-color: #222;
}
code {
color: lawngreen;
}
a {
color: lightskyblue;
}
table, td, th {
border-color: white;
}
}
@media (prefers-color-scheme: light) {
html {
background-color: white;
color: black;
}
.globalnav-element {
background-color: #ddd;
}
code {
color: green;
}
table, td, th {
border-color: black;
}
}