Skip to content

Commit 142e923

Browse files
committed
refactor: replace get-gradient function with linear-gradient for simplicity
1 parent 1573721 commit 142e923

1 file changed

Lines changed: 15 additions & 21 deletions

File tree

packages/atlas/src/themesource/atlas_core/web/_variables.scss

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,14 @@ $color-value-map: (
6565
}
6666
}
6767

68-
/// Generates a linear gradient with direction and computed color shades
69-
/// @param {string} $color-name - Base color name ("brand-primary", "gray", etc.)
70-
/// @param {number} $shade-1 - First shade (50, 100, 200, ..., 900)
71-
/// @param {number} $shade-2 - Second shade (50, 100, 200, ..., 900)
72-
/// @param {string} $direction - CSS gradient direction (e.g., "to bottom", "45deg", "to right") [default: "to bottom"]
73-
/// @return {gradient} - Linear gradient string
74-
@function get-gradient($color-name, $shade-1, $shade-2, $direction: "to bottom") {
75-
@if $use-css-variables {
76-
@return linear-gradient(#{$direction}, var(--#{$color-name}-#{$shade-1}), var(--#{$color-name}-#{$shade-2}));
77-
} @else {
78-
@return linear-gradient(
79-
#{$direction},
80-
get-color-value($color-name, $shade-1),
81-
get-color-value($color-name, $shade-2)
82-
);
83-
}
84-
}
85-
8668
$brand-logo: false !default;
8769
$brand-logo-height: 24px !default;
8870
$brand-logo-width: 32px !default;
89-
$brand-gradient: get-gradient("brand-primary", 900, 700, "to bottom") !default;
71+
$brand-gradient: linear-gradient(
72+
to bottom,
73+
get-color-value("brand-primary", 900),
74+
get-color-value("brand-primary", 700)
75+
) !default;
9076

9177
/* Default Font Size & Color */
9278
$font-size-default: 14px !default;
@@ -106,12 +92,20 @@ $border-width-default: $border-width-thin !default;
10692
$border-default: $border-width-default solid $border-color-default !default;
10793

10894
/* Topbar */
109-
$topbar-bg: get-gradient("brand-primary", 500, 600, "to bottom") !default;
95+
$topbar-bg: linear-gradient(
96+
to bottom,
97+
get-color-value("brand-primary", 500),
98+
get-color-value("brand-primary", 600)
99+
) !default;
110100
$topbar-minimalheight: 48px !default;
111101
$topbar-border-color: $border-color-default !default;
112102

113103
/* Sidebar */
114-
$sidebar-bg: get-gradient("brand-primary", 600, 700, "to bottom") !default;
104+
$sidebar-bg: linear-gradient(
105+
to bottom,
106+
get-color-value("brand-primary", 600),
107+
get-color-value("brand-primary", 700)
108+
) !default;
115109

116110
/* Topbar mobile */
117111
$m-header-height: 45px !default;

0 commit comments

Comments
 (0)