Skip to content

Commit 5e64dce

Browse files
committed
feat(Shelf): increase contrast on non-selected Shelf Tabs
1 parent e0823da commit 5e64dce

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

meteor/client/styles/shelf/shelf.scss

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,34 +128,61 @@
128128
}
129129

130130
.rundown-view__shelf__tabs__tab {
131+
position: relative;
131132
display: block;
132133
background: none;
133134
border: none;
134-
position: relative;
135135
flex: 1 1;
136136
max-width: 7em;
137137
min-width: min-content;
138138
overflow: hidden;
139139
text-overflow: ellipsis;
140140
white-space: nowrap;
141141
text-align: center;
142-
color: #8f8f8f;
143142
line-height: $inspector-shelf-tabs-height;
144143
cursor: pointer;
145144
user-select: none;
146145
padding-inline: 1.5em;
147146

148147
outline-offset: -5px;
149148

149+
// this is a setup that ensures that the min-content is calculated with this font-weight,
150+
// while we display the button with differing font-weights depending on state
151+
font-weight: 500;
152+
color: transparent;
153+
150154
&:hover {
151-
color: #fff;
152-
transition: 0.3s;
155+
// color: #fff;
156+
// transition: 0.3s;
157+
158+
> .rundown-view__shelf__tabs__tab-label {
159+
color: #fff;
160+
transition: 0.3s;
161+
}
162+
}
163+
164+
> .rundown-view__shelf__tabs__tab-label {
165+
position: absolute;
166+
top: 0;
167+
left: 0;
168+
right: 0;
169+
line-height: inherit;
170+
font-weight: 300;
171+
color: #b0b0b0;
153172
}
154173

155174
&.selected {
156-
color: #fff;
157-
font-weight: 500;
158-
text-shadow: 0 0 5px #000;
175+
// color: #fff;
176+
// font-weight: 500;
177+
// text-shadow: 0 0 5px #000;
178+
// transition: 0s;
179+
180+
> .rundown-view__shelf__tabs__tab-label {
181+
color: #fff;
182+
font-weight: 500;
183+
text-shadow: 0 0 5px #000;
184+
transition: 0s;
185+
}
159186

160187
&::after {
161188
content: ' ';

meteor/client/ui/Shelf/ShelfRundownLayout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export function ShelfRundownLayout(props: Readonly<IShelfRundownLayoutProps>): J
5252
tabIndex={0}
5353
role="tab"
5454
>
55+
<div className="rundown-view__shelf__tabs__tab-label">{t('AdLib')}</div>
5556
{t('AdLib')}
5657
</button>
5758
<button
@@ -62,6 +63,7 @@ export function ShelfRundownLayout(props: Readonly<IShelfRundownLayoutProps>): J
6263
tabIndex={0}
6364
role="tab"
6465
>
66+
<div className="rundown-view__shelf__tabs__tab-label">{t('Global AdLib')}</div>
6567
{t('Global AdLib')}
6668
</button>
6769
</>
@@ -79,6 +81,7 @@ export function ShelfRundownLayout(props: Readonly<IShelfRundownLayoutProps>): J
7981
tabIndex={0}
8082
role="tab"
8183
>
84+
<div className="rundown-view__shelf__tabs__tab-label">{panel.name}</div>
8285
{panel.name}
8386
</button>
8487
))
@@ -91,6 +94,7 @@ export function ShelfRundownLayout(props: Readonly<IShelfRundownLayoutProps>): J
9194
tabIndex={0}
9295
role="tab"
9396
>
97+
<div className="rundown-view__shelf__tabs__tab-label">{t('Shortcuts')}</div>
9498
{t('Shortcuts')}
9599
</button>
96100
</OverflowingContainer>

0 commit comments

Comments
 (0)