Skip to content

Commit c73e24c

Browse files
committed
🎨: Update SCSS variables and improve styling consistency
- Rename SCSS variables for better clarity and consistency across the styles. - Replace hardcoded color values with variable references to enhance maintainability. Signed-off-by: Alexandre Nicolaie <[email protected]>
1 parent f7dd140 commit c73e24c

File tree

1 file changed

+52
-35
lines changed

1 file changed

+52
-35
lines changed

src/styles/index.scss

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,52 @@
1-
// Variables
1+
// -----------------------------------------------------------------------------
2+
// Global Variables
3+
// -----------------------------------------------------------------------------
4+
5+
// Layout
26
$container-height: calc(100vh - 100px);
3-
$warning-bg-color: #fff8e1;
4-
$warning-border-color: #f4c030;
5-
$warning-text-color: #5c4c00;
6-
$control-text-color: #6d7f8b;
7-
$control-hover-bg: #d1d5d9;
8-
$separator-color: #dee6eb;
9-
$secondary-text-color: #666;
10-
$panel-title-text-color: rgb(109, 127, 139);
11-
$selection-color: rgba(56, 114, 224, 0.8);
12-
13-
// Container
7+
8+
// Colors
9+
$color-warning-bg: #fff8e1;
10+
$color-warning-border: #f4c030;
11+
$color-warning-text: #5c4c00;
12+
$color-control-text: #6d7f8b;
13+
$color-control-hover-bg: #d1d5d9;
14+
$color-separator: #dee6eb;
15+
$color-secondary-text: #666666;
16+
$color-panel-title: #6d7f8b;
17+
$color-selection: #3872e0cc; // rgba(56, 114, 224, 0.8) as hex with alpha
18+
$color-shadow: #8fa4b1;
19+
$color-white: #ffffff;
20+
21+
// -----------------------------------------------------------------------------
22+
// Main Layout
23+
// -----------------------------------------------------------------------------
24+
1425
.argocd-application-map {
26+
// ---------------------------------------------------------------------------
27+
// Main container for the application map
28+
// ---------------------------------------------------------------------------
1529
&__container {
1630
height: $container-height;
1731
width: 100%;
1832
box-sizing: border-box;
1933
overflow: hidden;
2034
}
2135

22-
// Controls Panel
36+
// ---------------------------------------------------------------------------
37+
// Controls Panel (buttons, etc.)
38+
// ---------------------------------------------------------------------------
2339
&__controls-panel {
2440
margin-left: 10px;
2541
padding: 5px;
26-
box-shadow: 1px 1px 3px #8fa4b1;
27-
background: #fff;
42+
box-shadow: 1px 1px 3px $color-shadow;
43+
background: $color-white;
2844
}
2945

3046
&__control-button {
3147
padding: 5px;
3248
margin: 2px;
33-
color: $control-text-color;
49+
color: $color-control-text;
3450
border-radius: 5px;
3551
vertical-align: middle;
3652
font-weight: 500;
@@ -48,16 +64,18 @@ $selection-color: rgba(56, 114, 224, 0.8);
4864
color 0.2s;
4965

5066
&:hover {
51-
background-color: $control-hover-bg;
67+
background-color: $color-control-hover-bg;
5268
}
5369
}
5470

5571
&__separator {
56-
border-right: 1px solid $separator-color;
72+
border-right: 1px solid $color-separator;
5773
padding: 6px 0;
5874
}
5975

76+
// ---------------------------------------------------------------------------
6077
// Status Panel
78+
// ---------------------------------------------------------------------------
6179
&__status-panel {
6280
&__title {
6381
line-height: 19.5px;
@@ -66,9 +84,8 @@ $selection-color: rgba(56, 114, 224, 0.8);
6684
& label {
6785
font-size: 12px;
6886
font-weight: 600;
69-
7087
.theme-light & {
71-
color: $panel-title-text-color;
88+
color: $color-panel-title;
7289
}
7390
}
7491
}
@@ -77,13 +94,13 @@ $selection-color: rgba(56, 114, 224, 0.8);
7794
&-box {
7895
margin-top: 8px;
7996
padding: 8px 12px;
80-
background-color: $warning-bg-color;
81-
border-left: 4px solid $warning-border-color;
97+
background-color: $color-warning-bg;
98+
border-left: 4px solid $color-warning-border;
8299
}
83100

84101
&-text {
85102
font-size: 12px;
86-
color: $warning-text-color;
103+
color: $color-warning-text;
87104
}
88105

89106
&-header {
@@ -101,14 +118,17 @@ $selection-color: rgba(56, 114, 224, 0.8);
101118

102119
&-footer {
103120
font-size: 11px;
104-
color: $secondary-text-color;
121+
color: $color-secondary-text;
105122
margin-top: 4px;
106123
}
107124
}
108125
}
109126

127+
// ---------------------------------------------------------------------------
128+
// Node Kind Icon
129+
// ---------------------------------------------------------------------------
110130
&__node-kind-icon-as {
111-
background-color: #8fa4b1;
131+
background-color: $color-shadow;
112132
border-radius: 50%;
113133
display: inline-block;
114134
font-weight: 400;
@@ -120,54 +140,51 @@ $selection-color: rgba(56, 114, 224, 0.8);
120140
width: 32px;
121141
}
122142

143+
// ---------------------------------------------------------------------------
123144
// Node selection states
145+
// ---------------------------------------------------------------------------
124146
&__node {
125147
&--default {
126148
opacity: 1;
127149
}
128-
129150
&--selected {
130151
opacity: 1;
131152
position: relative;
132153
}
133-
134154
&--unselected {
135155
opacity: 0.25;
136156
}
137157
}
138158

159+
// ---------------------------------------------------------------------------
139160
// Edge selection states
161+
// ---------------------------------------------------------------------------
140162
&__edge {
141163
&--default {
142-
stroke: #777;
164+
stroke: #777777;
143165
stroke-width: 1;
144166
stroke-dasharray: 3, 3;
145167
stroke-opacity: 1;
146168
}
147-
148169
&--selected {
149-
stroke: #777;
170+
stroke: #777777;
150171
stroke-width: 1;
151172
stroke-dasharray: none;
152173
stroke-opacity: 1;
153174
}
154-
155175
&--unselected {
156-
stroke: #777;
176+
stroke: #777777;
157177
stroke-width: 1;
158178
stroke-dasharray: 3, 3;
159179
stroke-opacity: 0.25;
160180
}
161-
162181
&__marker {
163182
&--default {
164183
opacity: 1;
165184
}
166-
167185
&--selected {
168186
opacity: 1;
169187
}
170-
171188
&--unselected {
172189
opacity: 0.5;
173190
}

0 commit comments

Comments
 (0)