chore: improve css with variables

This commit is contained in:
2026-01-28 20:59:07 +01:00
parent 6d88a87b89
commit 226b0d95ab
5 changed files with 126 additions and 129 deletions

View File

@@ -6,12 +6,86 @@
<style lang="css"> <style lang="css">
:root { :root {
/* Colors */
--primary-color: #fff; --primary-color: #fff;
--secondary-color: #000; --secondary-color: #000;
/* Spacing scale */
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-10: 2.5rem;
--space-12: 3rem;
--space-16: 4rem;
/* Typography scale - Mobile first (base) */
--text-xs: 0.65rem;
--text-sm: 0.75rem;
--text-base: 1rem;
--text-lg: 1.25rem;
--text-xl: 1.5rem;
/* Line heights */
--leading-tight: 1.2;
--leading-normal: 1.5;
--leading-relaxed: 1.625;
/* Font families */
--font-primary: 'Abbiocco Beta', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-accent: 'Bazaar', sans-serif;
/* Breakpoints (for reference - use in media queries as raw values) */
/* --bp-md: 768px */
/* --bp-lg: 1024px */
/* --bp-xl: 1536px */
/* --bp-2xl: 1920px */
}
/* Tablet (768px+) */
@media (min-width: 768px) {
:root {
--text-xs: 0.75rem;
--text-sm: 0.9rem;
--text-base: 1rem;
--text-lg: 1.4rem;
--text-xl: 1.5rem;
}
}
/* Desktop (1024px+) */
@media (min-width: 1024px) {
:root {
--text-xs: 0.95rem;
--text-sm: 1.15rem;
--text-base: 1.15rem;
--text-lg: 1.75rem;
--text-xl: 1.8rem;
}
}
/* Large desktop (1536px+) */
@media (min-width: 1536px) {
:root {
--text-xs: 1rem;
--text-sm: 1.35rem;
--text-lg: 2.4rem;
}
}
/* Extra large (1920px+) */
@media (min-width: 1920px) {
:root {
--text-xs: 1.15rem;
--text-lg: 3.2rem;
}
} }
html, body, p, a, button, address, h2 { html, body, p, a, button, address, h2 {
font-family: 'Abbiocco Beta', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-family: var(--font-primary);
} }
a { a {

View File

@@ -36,19 +36,19 @@ onMounted(() => {
footer { footer {
background-color: var(--primary-color); background-color: var(--primary-color);
color: var(--secondary-color); color: var(--secondary-color);
padding: 0 1.5rem; padding: 0 var(--space-6);
} }
.wrapper { .wrapper {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
gap: 1.5rem; gap: var(--space-6);
padding: 1.5rem 0; padding: var(--space-6) 0;
} }
address { address {
font-size: 0.65rem; font-size: var(--text-xs);
line-height: 12px; line-height: var(--leading-relaxed);
} }
img { img {
@@ -57,32 +57,22 @@ img {
@media (min-width: 768px) { @media (min-width: 768px) {
.wrapper { .wrapper {
gap: 3rem; gap: var(--space-12);
} }
img { img {
height: 104px; height: 104px;
} }
address {
font-size: 0.75rem;
line-height: 14px;
}
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.wrapper { .wrapper {
gap: 8rem; gap: var(--space-16);
} }
img { img {
height: 120px; height: 120px;
} }
address {
font-size: 0.95rem;
line-height: 15px;
}
} }
@media (min-width: 1536px) { @media (min-width: 1536px) {
@@ -93,11 +83,6 @@ img {
img { img {
height: 146px; height: 146px;
} }
address {
font-size: 1rem;
line-height: 20px;
}
} }
@media (min-width: 1920px) { @media (min-width: 1920px) {
@@ -108,11 +93,5 @@ img {
img { img {
height: 155px; height: 155px;
} }
address {
font-size: 1.15rem;
line-height: 22px;
}
} }
</style> </style>

View File

@@ -55,9 +55,9 @@ const { isScrolled } = useScroll(scrollThreshold.value)
} }
.app-header { .app-header {
gap: 1rem; gap: var(--space-4);
flex-direction: column; flex-direction: column;
padding: 3rem 2rem; padding: var(--space-12) var(--space-8);
height: 68vh; height: 68vh;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -65,7 +65,7 @@ const { isScrolled } = useScroll(scrollThreshold.value)
.app-header > div { .app-header > div {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: var(--space-4);
} }
.app-header--sticky { .app-header--sticky {
@@ -73,7 +73,7 @@ const { isScrolled } = useScroll(scrollThreshold.value)
top: 0; top: 0;
width: 100%; width: 100%;
height: 34px; height: 34px;
padding: 0.75rem 1rem; padding: var(--space-3) var(--space-4);
align-items: center; align-items: center;
animation: slideDown 0.3s ease; animation: slideDown 0.3s ease;
z-index: 10; z-index: 10;
@@ -97,21 +97,21 @@ const { isScrolled } = useScroll(scrollThreshold.value)
nav { nav {
display: flex; display: flex;
gap: 2.5rem; gap: var(--space-10);
margin-left: auto; margin-left: auto;
} }
a { a {
display: flex; display: flex;
gap: 0.5rem; gap: var(--space-2);
align-items: center; align-items: center;
color: inherit; color: inherit;
font-size: 0.75rem; font-size: var(--text-sm);
} }
p { p {
font-size: 1.25rem; font-size: var(--text-lg);
line-height: 1.5rem; line-height: var(--leading-normal);
} }
@media (min-width: 768px) { @media (min-width: 768px) {
@@ -121,13 +121,13 @@ p {
.app-header > div { .app-header > div {
position: absolute; position: absolute;
bottom: 3rem; bottom: var(--space-12);
} }
.app-header > div > div { .app-header > div > div {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: 0.25rem; gap: var(--space-1);
} }
.brand { .brand {
@@ -137,21 +137,12 @@ p {
.brand-logo { .brand-logo {
width: 168px; width: 168px;
} }
p {
font-size: 1.4rem;
line-height: inherit;
}
a {
font-size: 0.9rem;
}
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.app-header--sticky { .app-header--sticky {
height: 64px; height: 64px;
padding: 1rem 4rem; padding: var(--space-4) var(--space-16);
} }
.app-header--sticky img { .app-header--sticky img {
@@ -165,14 +156,6 @@ p {
.brand { .brand {
width: 460px; width: 460px;
} }
a {
font-size: 1.15rem;
}
p {
font-size: 1.75rem;
}
} }
@media (min-width: 1536px) { @media (min-width: 1536px) {
@@ -183,14 +166,6 @@ p {
.brand { .brand {
width: 688px; width: 688px;
} }
a {
font-size: 1.35rem;
}
p {
font-size: 2.4rem;
}
} }
@media (min-width: 1920px) { @media (min-width: 1920px) {
@@ -201,9 +176,5 @@ p {
.brand { .brand {
width: 892px; width: 892px;
} }
p {
font-size: 3.2rem;
}
} }
</style> </style>

View File

@@ -63,18 +63,18 @@ article {
border-top: 1px solid var(--primary-color); border-top: 1px solid var(--primary-color);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: var(--space-4);
} }
header > div, header > div,
h2 { h2 {
font-size: 0.75rem; font-size: var(--text-sm);
} }
h2 { h2 {
padding: 0.5rem 0rem; padding: var(--space-2) 0;
display: flex; display: flex;
gap: 0.5rem; gap: var(--space-2);
align-items: center; align-items: center;
} }
@@ -102,11 +102,11 @@ h2 button img {
.image-wrap > img { .image-wrap > img {
width: 100%; width: 100%;
margin-bottom: 1rem; margin-bottom: var(--space-4);
} }
header > div { header > div {
padding-left: 1.25rem; padding-left: var(--space-5);
} }
header { header {
@@ -125,47 +125,32 @@ header {
} }
.trigger-additional { .trigger-additional {
font-family: 'Bazaar', sans-serif; font-family: var(--font-accent);
background: transparent; background: transparent;
color: #FFFFFF; color: var(--primary-color);
border-radius: 16px; border-radius: 16px;
border: 2px solid var(--primary-color); border: 2px solid var(--primary-color);
padding: 0.3rem 0.4rem; padding: var(--space-1) var(--space-2);
font-size: 1.25rem; font-size: var(--text-lg);
margin-top: 0.85rem; line-height: var(--leading-tight);
margin-top: var(--space-3);
transform: rotate(-2.6deg); transform: rotate(-2.6deg);
line-height: 1.25rem;
} }
@media (min-width: 768px) { @media (min-width: 768px) {
h2,
header > div {
font-size: 1rem;
}
.trigger-additional { .trigger-additional {
font-size: 1.5rem;
line-height: 1.5rem;
border-radius: 20px; border-radius: 20px;
} }
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
h2,
header > div {
font-size: 1.15rem;
}
h2 button img { h2 button img {
width: 14px; width: 14px;
} }
.trigger-additional { .trigger-additional {
font-size: 1.8rem; padding: var(--space-2) var(--space-2);
line-height: 1.8rem;
padding: 0.4rem 0.5rem;
border-radius: 24px; border-radius: 24px;
} }
} }
</style> </style>

View File

@@ -61,13 +61,13 @@ useSeoMeta({
.nuxt-content { .nuxt-content {
background-color: var(--secondary-color); background-color: var(--secondary-color);
color: var(--primary-color); color: var(--primary-color);
padding: 1rem; padding: var(--space-4);
} }
.load-more { .load-more {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: var(--space-2);
background: none; background: none;
border: none; border: none;
color: var(--primary-color); color: var(--primary-color);
@@ -80,8 +80,8 @@ useSeoMeta({
} }
#about { #about {
padding: 0 1rem; padding: 0 var(--space-4);
margin-top: 1rem; margin-top: var(--space-4);
background-color: var(--primary-color); background-color: var(--primary-color);
color: var(--secondary-color); color: var(--secondary-color);
} }
@@ -89,72 +89,60 @@ useSeoMeta({
#about article { #about article {
border-top: 1px solid var(--secondary-color); border-top: 1px solid var(--secondary-color);
border-bottom: 1px solid var(--secondary-color); border-bottom: 1px solid var(--secondary-color);
padding: 0.5rem 0 1rem 0; padding: var(--space-2) 0 var(--space-4) 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.5rem; gap: var(--space-2);
line-height: 15px; line-height: var(--leading-normal);
} }
.load-more, .load-more,
#about article { #about article {
font-size: 0.75rem; font-size: var(--text-sm);
} }
article h2 { article h2 {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: var(--space-2);
} }
@media (min-width: 768px) { @media (min-width: 768px) {
#about { #about {
margin-top: 2rem; margin-top: var(--space-8);
} }
#about article { #about article {
padding-bottom: 2rem; padding-bottom: var(--space-8);
} }
#about article > div { #about article > div {
margin-left: 33.333%; margin-left: 33.333%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: var(--space-4);
}
.load-more,
#about article {
font-size: 1rem;
line-height: 20px;
} }
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
#about { #about {
margin-top: 2.5rem; margin-top: var(--space-10);
} }
#about article { #about article {
padding-bottom: 2.5rem; padding-bottom: var(--space-10);
} }
#about article > div { #about article > div {
padding-right: 1rem; padding-right: var(--space-4);
}
.load-more,
#about article {
font-size: 1.15rem;
line-height: 22px;
} }
} }
@media (min-width: 1536px) { @media (min-width: 1536px) {
#about article > div { #about article > div {
flex-direction: row; flex-direction: row;
gap: 2rem; gap: var(--space-8);
padding-right: 2rem; padding-right: var(--space-8);
} }
#about article > div > p { #about article > div > p {