Skip to content

Commit 415b14a

Browse files
committed
Port GTip styling to CSS custom properties
Drops the @import of @/style/scss/theme/blue.scss and switches to the --color-* tokens from custom_theme_variables.scss (PR galaxyproject#19946, Laila Los): --color-blue-600 for info, --color-orange-600/200 for warning, --color-green-600/200 for success, --color-red-600/200 for danger, and --color-grey-100 for neutral background. GTip was the only G-component with an explicit theme SCSS import, so removing it cleans up the last bit of mandatory theme coupling in BaseComponents. The SCSS scale-color() calls for warning/success/danger backgrounds map to the 200-shade of each hue, which is the closest pre-defined match and avoids the partial-transparency pattern the color system intentionally moved away from. Prep work for the @galaxyproject/galaxy-ui workspace package: the package can't depend on Galaxy's SCSS theme, so it consumes CSS custom properties injected by the app at :root.
1 parent e922a29 commit 415b14a

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

  • client/src/components/BaseComponents

client/src/components/BaseComponents/GTip.vue

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,31 @@ onUnmounted(() => {
8686
</template>
8787

8888
<style scoped lang="scss">
89-
@import "@/style/scss/theme/blue.scss";
90-
9189
.g-tip {
9290
position: relative;
9391
padding: 0.5rem 0.75rem;
94-
background-color: $gray-100;
95-
border-radius: $border-radius-base;
96-
border-left: 3px solid $brand-primary;
92+
background-color: var(--color-grey-100);
93+
border-radius: 0.25rem;
94+
border-left: 3px solid var(--color-blue-600);
9795
9896
&.tip-info {
99-
background-color: $gray-100;
100-
border-left-color: $brand-primary;
97+
background-color: var(--color-grey-100);
98+
border-left-color: var(--color-blue-600);
10199
}
102100
103101
&.tip-warning {
104-
background-color: scale-color($brand-warning, $lightness: +75%);
105-
border-left-color: $brand-warning;
102+
background-color: var(--color-orange-200);
103+
border-left-color: var(--color-orange-600);
106104
}
107105
108106
&.tip-success {
109-
background-color: scale-color($brand-success, $lightness: +75%);
110-
border-left-color: $brand-success;
107+
background-color: var(--color-green-200);
108+
border-left-color: var(--color-green-600);
111109
}
112110
113111
&.tip-danger {
114-
background-color: scale-color($brand-danger, $lightness: +75%);
115-
border-left-color: $brand-danger;
112+
background-color: var(--color-red-200);
113+
border-left-color: var(--color-red-600);
116114
}
117115
}
118116

0 commit comments

Comments
 (0)