my-website/static/css/general.css

294 lines
4 KiB
CSS

* {
padding: 0;
margin: 0;
border: none;
border-collapse: collapse;
box-sizing: border-box !important;
overflow-wrap: anywhere;
object-fit: scale-down;
scroll-behavior: smooth;
}
:root {
max-width: inherit;
overflow-x: hidden;
overflow-y: auto;
}
html:not(:root),
body:not(:root) {
max-width: inherit;
}
#root {
font-family: monospace;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
min-height: 100vh;
}
#root > * {
flex-grow: 0;
flex-shrink: 0;
}
header,
footer {
text-align: center;
}
#header-title {
display: block;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
footer {
padding-top: 0.5rem;
}
#header-delimiter {
padding-top: 0;
margin-top: 0;
}
#footer-delimiter {
padding-bottom: 0;
margin-bottom: 0;
}
.globalnav {
display: flex;
flex-wrap: wrap;
flex-direction: row;
text-align: center;
gap: 2px;
height: max-content;
}
.globalnav-element {
display: block;
background-color: rgb(90% 90% 90%);
text-align: center;
flex-basis: 0;
flex-grow: 1;
min-width: fit-content;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
/* Code Blocks */
pre {
display: block;
padding: 0.75rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
margin-left: auto;
margin-right: auto;
width: fit-content;
max-width: 100%;
overflow-x: auto;
line-break: strict;
}
/* Inline keywords/code */
code {
display: inline-block;
color: green;
line-break: strict;
}
p {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
h2 {
margin-bottom: 1rem;
text-align: center;
}
#mainarticle {
width: fit-content;
max-width: min(100%, 72rem);
margin-left: auto;
margin-right: auto;
flex-grow: 1;
text-align: justify;
}
#mainarticle h3 {
margin-top: 1rem;
margin-bottom: 1rem;
}
ul > li,
ol > li {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
li::marker {
width: 1rem;
max-width: 100%;
padding: 0;
margin: 0;
border: none;
}
li {
margin-inline-start: 1rem;
}
hr {
border-style: inset;
border-width: 1px;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
table {
display: block;
border-collapse: collapse;
margin: 1rem auto;
width: fit-content;
max-width: 100%;
overflow-x: auto;
}
tr {
width: fit-content;
}
td,
th {
border-style: solid;
border-color: black;
border-collapse: collapse;
padding: 0.5rem;
}
img {
display: block;
min-height: unset;
min-width: unset;
height: auto;
width: auto;
max-width: 100%;
max-height: unset;
margin-left: auto;
margin-right: auto;
object-fit: scale-down;
object-position: center;
}
details {
backdrop-filter: invert(100%);
padding: max(1mm, 1px);
width: min-content;
max-width: fit-content;
min-width: unset;
display: block;
color: black;
}
details > summary {
max-width: fit-content;
width: max-content;
display: block;
}
details:not([open]) > summary::after {
content: "Click to expand";
display: block;
max-width: fit-content;
font-weight: bold;
}
details[open] > summary {
margin-bottom: max(1mm, 1px);
}
#licenseimg {
vertical-align: middle;
height: inherit;
width: auto;
display: inline;
}
#last-article-metadata {
margin-bottom: 1rem;
}
.visible-article-metadata {
display: contents;
font-size: small;
font-style: italic;
}
.article-metadata-label {
font-weight: bold;
}
.article-missinglicense {
font-size: xx-small;
}
@media (prefers-color-scheme: dark) {
* {
scrollbar-color: white black;
}
html {
background-color: black;
color: white;
}
.globalnav-element {
background-color: rgb(10% 10% 10%);
}
code {
color: lawngreen;
}
a {
color: lightskyblue;
}
table,
td,
th {
border-color: white;
}
details {
color: black;
}
}
@media (prefers-color-scheme: light) {
html {
background-color: white;
color: black;
}
.globalnav-element {
background-color: rgb(90% 90% 90%);
}
code {
color: green;
}
table,
td,
th {
border-color: black;
}
details {
color: white;
}
}