website/public/assets/css/shell.css
vlw 7a8fc36ec0 feat: new website design and update to Vegvisir 3.1 (#2)
Brand new design for the website following the new design language I used for [version 2.0 of my personal website](https://codeberg.org/vlw/vlw.se/releases/tag/2.0.0).

Reviewed-on: https://codeberg.org/vegvisir/website/pulls/2
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
2025-03-05 11:16:54 +00:00

384 lines
No EOL
6.7 KiB
CSS

:root {
--primer-color-accent: 0, 128, 255;
--color-accent: rgb(var(--primer-color-accent));
--padding: 20px;
--running-size: 80px;
}
/* # Cornerstones */
* {
margin: 0;
fill: inherit;
box-sizing: border-box;
font-family: inherit;
color: inherit;
font-size: inherit;
}
::-webkit-scrollbar {
display: none;
}
body {
display: grid;
justify-items: center;
grid-template-rows: var(--running-size) 1fr var(--running-size);
overscroll-behavior: none;
background-color: white;
color: black;
overflow-x: hidden;
min-height: 100svh;
font-size: 15px;
font-family: "Roboto Mono", sans-serif;
}
body::before {
transition: 1s opacity;
content: "";
position: absolute;
top: -5%;
left: 0;
width: 20%;
height: 5%;
border-radius: 100%;
z-index: 1000;
box-shadow:
0 0 30svh 10svh rgba(var(--primer-color-accent), .1),
0 0 30svh 60svh rgba(var(--primer-color-accent), .05),
0 0 30svh 150svh rgba(var(--primer-color-accent), .02)
;
opacity: 0;
}
/* "enable" the corner glow effect on initial load when a page has been fully loaded */
body[vv-top-page]::before {
opacity: 1;
}
a {
display: contents;
color: inherit;
text-decoration: none;
}
/* ## vv-shell */
vv-shell {
width: 100svw;
display: flex;
max-width: 1500px;
position: relative;
flex-direction: column;
}
/* # Components */
:is(h1, h2, h3, p, li) > a {
--underline-tickness: 3px;
display: initial;
text-decoration: underline;
text-decoration-thickness: var(--underline-tickness);
text-underline-offset: var(--underline-tickness);
text-decoration-color: var(--color-accent);
}
h1 {
font-size: 30px;
color: var(--color-accent);
}
h2 {
font-size: 30px;
}
h3 {
font-size: 25px;
}
/* ## Page transition */
[vv-loading] * {
transition: 200ms opacity;
}
[vv-loading="true"] * {
opacity: 0;
pointer-events: none;
}
[vv-loading="true"]::after {
content: "";
position: fixed;
top: 50%;
left: 50%;
width: 45px;
height: 49px;
background-size: contain;
image-rendering: pixelated;
transform: translate(-50%, -50%);
background-image: url("/assets/media/spinner.gif");
-webkit-filter: hue-rotate(var(--hue-accent));
filter: hue-rotate(var(--hue-accent));
}
/* ## Buttons */
button {
border: none;
background-color: transparent;
color: inherit;
fill: inherit;
cursor: pointer;
}
button * {
pointer-events: none;
}
/* ### Inline */
button.inline {
gap: 10px;
display: flex;
border-radius: 7px;
align-items: center;
fill: var(--color-accent);
color: var(--color-accent);
padding: calc(var(--padding) / 1.5);
background: linear-gradient(139deg, rgba(0, 0, 0, 0) 0%, rgba(var(--primer-color-accent), .1) 100%);
}
button.inline:not(.solid, .sly) {
box-shadow:
0 0 0 2px rgba(var(--primer-color-accent), .1),
10px 7px 40px 3px rgba(var(--primer-color-accent), .06)
;
}
button.inline svg {
flex: none;
height: 1em;
}
button.inline svg:last-child {
width: 1.5em;
margin-left: auto;
}
button.inline svg.chevron:last-child {
transform: rotate(-90deg);
}
/* #### Solid */
button.inline.solid {
fill: white;
color: white;
border-color: var(--color-accent);
background-color: var(--color-accent);
border: solid 2px rgba(var(--primer-color-accent), 1);
}
/* #### Sly */
button.sly {
border-color: transparent;
background: transparent;
box-shadow: none;
}
button.sly > svg.chevron {
transition: 200ms width;
width: 0;
}
button.sly:hover > svg.chevron {
width: 1.5em;
}
/* ## Header */
header {
--border-style: solid 1px rgba(0, 0, 0, .07);
top: 0;
width: 100%;
z-index: 100;
display: grid;
position: sticky;
overflow: hidden;
align-items: stretch;
backdrop-filter: blur(20px);
height: var(--running-size);
border-bottom: var(--border-style);
-webkit-backdrop-filter: blur(20px);
grid-template-rows: var(--running-size);
background-color: rgba(255, 255, 255, .8);
grid-template-columns: var(--running-size) repeat(2, 1fr);
}
/* ### Nav */
header nav {
display: flex;
align-items: center;
padding: var(--padding);
justify-content: baseline;
}
header nav:last-of-type {
justify-content: end;
gap: calc(var(--padding) / 2);
}
:is(header, footer) nav.m {
display: none;
}
/* ### Spacer */
header nav > div {
width: 2px;
height: 80%;
margin: 0 var(--padding);
background-color: rgba(0, 0, 0, .07);
}
/* ### Buttons */
header button {
--icon-size: 25px;
display: grid;
border-left: var(--border-style);
grid-template-columns: 1fr;
align-items: center;
justify-items: center;
padding: var(--padding);
gap: var(--padding);
fill: var(--color-accent);
font-size: 13px;
color: rgba(255, 255, 255, .5);
cursor: pointer;
}
header button:not(.logo) svg {
width: var(--icon-size);
}
header button.search p {
display: none;
}
/* ## Footer */
footer {
width: 100%;
display: grid;
color: white;
position: sticky;
overflow: hidden;
align-items: stretch;
height: var(--running-size);
grid-template-rows: var(--running-size);
background-color: var(--color-accent);
grid-template-columns: repeat(2, 1fr);
}
/* ### Nav */
footer nav {
display: flex;
align-items: center;
padding: var(--padding);
justify-content: baseline;
}
footer nav:last-of-type {
justify-content: end;
gap: calc(var(--padding) / 2);
}
/* ### Spacer */
footer nav > div {
width: 2px;
height: 80%;
margin: 0 var(--padding);
background-color: rgba(0, 0, 0, .07);
}
/* ### Buttons */
footer button.inline:not(.solid):hover,
footer button.inline {
fill: white;
color: white;
}
footer button.inline.solid {
color: var(--color-accent);
background-color: white;
}
/* # Feature queries */
@media (hover: hover) {
:is(h1, h2, h3, p, li) > a:hover {
text-underline-offset: 1px;
text-decoration-thickness: calc(var(--underline-tickness) * 2);
color: var(--color-accent);
}
/* # Components */
button.inline {
transition-duration: 300ms;
transition-property: background-color, border-color, box-shadow, color, fill;
}
button:hover {
border-color: rgba(255, 255, 255, .2);
background-color: rgba(255, 255, 255, .1);
}
button.inline:hover {
fill: var(--color-accent);
color: var(--color-accent);
}
button.inline:not(.solid):hover {
box-shadow:
0 0 0 2px rgba(var(--primer-color-accent), 1),
10px 7px 30px 3px rgba(var(--primer-color-accent), .07)
;
}
button.solid:hover {
border-color: rgba(var(--primer-color-accent), .2);
background-color: rgba(var(--primer-color-accent), .2);
box-shadow: 0 -10px 20px 10px rgba(var(--primer-color-accent), .05);
}
}
/* # Size queries */
@media (max-width: 950px) {
footer,
header {
grid-template-columns: var(--running-size) 1fr;
}
:is(header, footer) nav.m {
display: flex;
padding-left: calc(var(--padding) / 2);
justify-content: space-between;
}
:is(header, footer) nav:not(.m) {
display: none;
}
}