refactor: use SASS @use over @import

This commit is contained in:
2024-11-13 23:16:35 +01:00
parent ac3070b0b7
commit cbd1062d82
20 changed files with 66 additions and 38 deletions

View File

@@ -15,6 +15,7 @@
</style>
<script lang="ts">
import 'sanitize.css'
import '../style/global.scss'
import { PUBLIC_ANALYTICS_DOMAIN } from '$env/static/public'
@@ -94,7 +95,7 @@
<svelte:window bind:innerHeight />
<svelte:head>
<link rel="canonical" href={$page.url.href} />
<link rel="canonical" href={$page.url.href.split('#')[0]} />
{#each fonts as font}
<link rel="preload" href="/fonts/{font}.woff2" as="font" type="font/woff2" crossorigin="anonymous">

View File

@@ -1,3 +1,6 @@
@use "imports" as *;
/*
** Earth icon
*/

View File

@@ -1,3 +1,6 @@
@use "../imports" as *;
.photo {
overflow: hidden;
background: $color-primary-tertiary20;

View File

@@ -1,3 +1,6 @@
@use "imports" as *;
html {
font: #{$base-font-size}/1.2 $font-sans;
font-weight: 400;

View File

@@ -1,3 +1,6 @@
@use "imports" as *;
/*
** Box shadows
*/

View File

@@ -1,3 +1,5 @@
@use "imports" as *;
/* Fonts list
========================================================================== */
@include font-face("Garnett", "G-Light", 200);
@@ -5,4 +7,4 @@
@include font-face("Garnett", "G-Medium", 500);
@include font-face("Garnett", "G-Semibold", 600);
@include font-face("Jazmin", "J-Extralight", 200);
@include font-face("Jazmin", "J-Light", 300);
@include font-face("Jazmin", "J-Light", 300);

View File

@@ -1,25 +1,22 @@
@charset "UTF-8";
// Dependencies
@import "sanitize.css/sanitize";
// Tools
@import "tools/helpers";
@forward "tools/helpers";
// Base
@import "variables-css";
@import "base";
@import "fonts";
@import "typography";
@import "effects";
@forward "variables-css";
@forward "base";
@forward "fonts";
@forward "typography";
// Layout
@import "layout/grid";
@import "layout/modules";
@forward "layout/grid";
@forward "layout/modules";
// Misc
@import "animations";
@forward "animations";
@forward "effects";
// Components (Atomic Design System)
// Atoms
@import "atoms/photo";
@forward "atoms/photo";

View File

@@ -1,4 +1,3 @@
// Tools
@import "variables";
@import "tools/mixins";
@import "tools/functions";
@forward "variables";
@forward "tools/mixins";
@forward "tools/functions";

View File

@@ -1,3 +1,6 @@
@use "../imports" as *;
/*
** Grid
*/

View File

@@ -1,3 +1,6 @@
@use "../imports" as *;
.grid-modules {
padding-bottom: 40px;

View File

@@ -1,4 +1,7 @@
@use "sass:math";
@use "sass:color";
@use "../variables" as *;
/* PX to REM
========================================================================== */
@@ -39,5 +42,5 @@
/* HEX color to RGB
========================================================================== */
@function hexToRGB($color) {
@return red($color), green($color), blue($color);
}
@return color.channel($color, "red", $space: rgb), color.channel($color, "green", $space: rgb), color.channel($color, "blue", $space: rgb);
}

View File

@@ -1,3 +1,6 @@
@use "../imports" as *;
/* Classes
========================================================================== */
.clear {

View File

@@ -1,5 +1,7 @@
@use "sass:math";
@use "sass:map";
@use "../variables" as *;
// Hide text
%hide-text {

View File

@@ -1,3 +1,6 @@
@use "imports" as *;
/* ==========================================================================
TITLES
========================================================================== */

View File

@@ -1,3 +1,6 @@
@use "imports" as *;
:root {
// Sizes
--container-width: #{$container-width};