Skip to content

Commit 1d65f06

Browse files
authored
Use scoped style for banner graphic (#15823)
1 parent ef8444a commit 1d65f06

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

shell/assets/styles/themes/_suse.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@
8383
--toggle-off-bg: #{$grey-70};
8484
--sortable-table-selected-bg: #3f4350;
8585
}
86-
86+
8787
// SUSE Theme uses a smaller banner graphic
88-
.suse-banner-graphic {
89-
height: 160px;
88+
--banner-graphic-height: 160px;
9089

90+
// SUSE Theme positions from right, so ship stays visible as browser width shrinks
91+
.suse-banner-graphic {
9192
> img {
9293
object-position: right;
9394
}

shell/components/BannerGraphic.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
<template>
3737
<div
3838
v-if="shown"
39-
class="banner-graphic"
39+
class="banner-graphic-area"
4040
:class="{[alignClass]: true}"
4141
>
4242
<div
@@ -67,10 +67,10 @@ export default {
6767
</div>
6868
</template>
6969
70-
<style lang="scss">
70+
<style lang="scss" scoped>
7171
$banner-height: 200px;
7272
73-
.banner-graphic {
73+
.banner-graphic-area {
7474
position: relative;
7575
7676
.graphic {
@@ -109,6 +109,6 @@ export default {
109109
110110
// Use top-level style so that a theme style can easily override via its own style without having to worry about specificity of CSS styles
111111
.banner-graphic-height {
112-
height: $banner-height;
112+
height: var(--banner-graphic-height, $banner-height);
113113
}
114114
</style>

0 commit comments

Comments
 (0)