From 9cd5919bd8ca87987d9bb3f735266c2398c6ce9e Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Tue, 19 May 2026 01:29:29 +0000
Subject: style(breakpoints): consolidate 9 ad-hoc values into 5 SCSS tokens

Adds src/styles/_breakpoints.scss with five canonical tokens
(\$bp-sm 600, \$bp-md 800, \$bp-lg 1024, \$bp-xl 1280, \$bp-2xl 1600)
and migrates all 15 @media (max-width: ...) occurrences across 9 files.
Configures vite.config.ts with scss loadPaths so any file can
@use "breakpoints" without relative paths.

Conservative rounding-up where existing values were near-duplicates:
500 and 512 collapse to 600, 768 collapses to 800, 1000 collapses to
1024. Slightly more viewports get the smaller-layout treatment in
those bands, which is usually beneficial on cramped widths.

Converts 7 Svelte files from <style> to <style lang="scss"> to access
the SCSS tokens. SCSS is a CSS superset, so existing rules stay valid.
---
 src/lib/Landing.svelte | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/lib/Landing.svelte')

diff --git a/src/lib/Landing.svelte b/src/lib/Landing.svelte
index bca1554c..4a6fa3d7 100644
--- a/src/lib/Landing.svelte
+++ b/src/lib/Landing.svelte
@@ -279,7 +279,9 @@ $effect(() => {
   </div>
 {/if}
 
-<style>
+<style lang="scss">
+  @use "breakpoints" as *;
+
   .landing {
     display: flex;
     flex-direction: column;
@@ -518,7 +520,7 @@ $effect(() => {
     }
   }
 
-  @media (max-width: 1000px) {
+  @media (max-width: $bp-lg) {
     .tools-and-demo {
       grid-template-columns: 1fr 1fr;
     }
@@ -529,7 +531,7 @@ $effect(() => {
     }
   }
 
-  @media (max-width: 800px) {
+  @media (max-width: $bp-md) {
     .section-row,
     .section-row.reverse {
       flex-direction: column;
@@ -564,7 +566,7 @@ $effect(() => {
     }
   }
 
-  @media (max-width: 500px) {
+  @media (max-width: $bp-sm) {
     .tools-and-demo {
       grid-template-columns: 1fr;
     }
-- 
cgit v1.2.3

