1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-23 23:02:58 +00:00

Reading constants in SCSS, modifying colors for Derpibooru variant

This commit is contained in:
2025-08-08 19:39:30 +04:00
parent c37f680e9f
commit 4837184d40
2 changed files with 49 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
@use 'sass:color';
@use 'environment';
$background: #15121a;
@@ -55,3 +56,31 @@ $error-background: #7a2725;
$warning-background: #7d4825;
$warning-border: #95562c;
@if environment.$current-site == 'derpibooru' {
$background: #141a24;
$text: #e0e0e0;
$text-gray: #90a1bb;
$link: #478acc;
$link-hover: #b099dd;
$header: #284371;
$header-toolbar: #1c3252;
$header-hover-background: #1d3153;
$header-mobile-link-hover: #546c99;
$footer: #1d242f;
$footer-text: $text-gray;
$block-header: #252d3c;
$block-border: #2d3649;
$block-background: #1d242f;
$block-background-alternate: #171d26;
$media-box-border: #3d4657;
$input-background: #282e39;
$input-border: #575e6b;
}

View File

@@ -0,0 +1,20 @@
@use 'sass:meta';
@use 'sass:string';
@function get-defined-constant($constant-name, $default-value: '') {
$resolved-value: $default-value;
@if meta.function-exists('vite-read-env-variable') {
$candidate-value: meta.call(meta.get-function('vite-read-env-variable'), $constant-name);
@if string.length($candidate-value) != 0 {
$resolved-value: $candidate-value
}
}
@return $resolved-value;
}
$current-site: get-defined-constant('__CURRENT_SITE__', 'furbooru');