mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-13 19:13:42 +02:00
239 lines
No EOL
4.1 KiB
CSS
Executable file
239 lines
No EOL
4.1 KiB
CSS
Executable file
/* -- Cornerstones -- */
|
|
|
|
:root {
|
|
--primer-color-base: 255, 255, 255;
|
|
--primer-color-contrast: 0, 0, 0;
|
|
|
|
--color-base: rgb(var(--primer-color-base));
|
|
--color-contrast: rgb(var(--primer-color-contrast));
|
|
|
|
--padding: 20px;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "Roboto Mono";
|
|
src:
|
|
local("Roboto Mono"),
|
|
url("../fonts/roboto-mono.woff2") format("woff2"),
|
|
url("../fonts/roboto-mono.ttf") format("ttf");
|
|
font-display: fallback;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
font-family: "Roboto Mono", "Courier", sans-serif;
|
|
font-size: 20px;
|
|
color: inherit;
|
|
}
|
|
|
|
::selection {
|
|
background-color: var(--color-contrast);
|
|
color: var(--color-base);
|
|
}
|
|
|
|
::placeholder {
|
|
color: rgba(var(--primer-color-contrast), .5);
|
|
}
|
|
|
|
html {
|
|
background-size: cover;
|
|
background-position: 50% 50%;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
color: var(--color-contrast);
|
|
background-color: rgba(var(--primer-color-base), .95);
|
|
gap: var(--padding);
|
|
padding: var(--padding) 0;
|
|
padding-bottom: 30vh;
|
|
}
|
|
|
|
a:not(p > a) {
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* -- Components -- */
|
|
|
|
input {
|
|
letter-spacing: 5px;
|
|
}
|
|
|
|
input,
|
|
.button {
|
|
background-color: var(--color-contrast);
|
|
color: var(--color-base);
|
|
padding: calc(var(--padding) / 2) calc(var(--padding) * 1.5);
|
|
text-align: left;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--padding);
|
|
height: 3em;
|
|
}
|
|
|
|
input,
|
|
.button.phantom {
|
|
background-color: transparent;
|
|
border: solid 2px var(--color-contrast);
|
|
color: var(--color-contrast);
|
|
}
|
|
|
|
img,
|
|
.button {
|
|
user-select: none;
|
|
}
|
|
|
|
.button :not(p) {
|
|
height: 2em;
|
|
}
|
|
|
|
.interact::before {
|
|
content: "tap ";
|
|
}
|
|
|
|
/* ---- */
|
|
|
|
.spacer {
|
|
display: grid;
|
|
justify-items: center;
|
|
}
|
|
|
|
body > .spacer {
|
|
margin: var(--padding) 0;
|
|
}
|
|
|
|
.spacer div {
|
|
width: 205px;
|
|
height: 7px;
|
|
background-color: var(--color-contrast);
|
|
transform: rotate(-4deg);
|
|
}
|
|
|
|
/* -- Content -- */
|
|
|
|
form,
|
|
section {
|
|
max-width: 600px;
|
|
margin: var(--padding) calc(var(--padding) * 1.5);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: justify;
|
|
gap: var(--padding);
|
|
}
|
|
|
|
section > *,
|
|
section picture > img {
|
|
width: 100%;
|
|
}
|
|
|
|
section#code {
|
|
text-align: center;
|
|
}
|
|
|
|
section#intro {
|
|
max-width: 250px;
|
|
text-align: center;
|
|
}
|
|
|
|
section#contact > div {
|
|
display: grid;
|
|
grid-template-rows: repeat(2, 1fr);
|
|
gap: var(--padding);
|
|
}
|
|
|
|
section#sky .button img {
|
|
height: 50%;
|
|
}
|
|
|
|
section#coffee > img {
|
|
width: 100px;
|
|
margin-bottom: calc(var(--padding) * 2);
|
|
}
|
|
|
|
/* ---- */
|
|
|
|
.banner {
|
|
width: 100%;
|
|
background-color: rgba(var(--primer-color-contrast), .05);
|
|
text-align: center;
|
|
padding: calc(var(--padding) / 2) 0;
|
|
margin: var(--padding) 0;
|
|
}
|
|
|
|
/* -- Media queries -- */
|
|
|
|
@media (hover: hover) {
|
|
.button:hover {
|
|
color: var(--color-contrast);
|
|
background-color: transparent;
|
|
border: inset 2px black;
|
|
}
|
|
|
|
.button:hover:not(.phantom) :is(img, svg) {
|
|
filter: invert(1);
|
|
}
|
|
|
|
.button:active {
|
|
background-color: rgba(var(--primer-color-contrast), .1);
|
|
}
|
|
|
|
/* ---- */
|
|
|
|
.button.phantom:hover {
|
|
background-color: rgba(var(--primer-color-contrast), .05);
|
|
}
|
|
|
|
.button.phantom:active {
|
|
background-color: rgba(var(--primer-color-contrast), .1);
|
|
}
|
|
}
|
|
|
|
@media (pointer: fine) {
|
|
.button {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.interact::before {
|
|
content: "click ";
|
|
}
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--primer-color-base: 0, 0, 0;
|
|
--primer-color-contrast: 255, 255, 255;
|
|
}
|
|
|
|
img:not(picture img) {
|
|
filter: invert(1);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 330px) {
|
|
section#sky .button img {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 660px) {
|
|
input,
|
|
.button {
|
|
height: 3.5em;
|
|
}
|
|
|
|
section#code {
|
|
display: grid;
|
|
grid-template-columns: 1fr 40px 1fr;
|
|
width: 100%;
|
|
}
|
|
|
|
section#contact > div {
|
|
grid-template-rows: 1fr;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
} |