Skip to content

Commit 7c0a930

Browse files
authored
Merge pull request Sofie-Automation#1593 from rjmunro/rjmunro/fix-scss-warinings
Fix some SCSS warinings
2 parents 19f6749 + 481b686 commit 7c0a930

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

packages/webui/src/client/ui/PreviewPopUp/PreviewPopUp.scss

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/itemTypeColors';
1+
@use '../../styles/itemTypeColors';
22

33
.preview-popUp {
44
border: 1px solid var(--sofie-segment-layer-hover-popup-border);
@@ -7,26 +7,8 @@
77
border-radius: 5px;
88
overflow: hidden;
99
pointer-events: none;
10-
1110
z-index: 9999;
12-
13-
&--large {
14-
width: 482px;
15-
padding-bottom: 10px;
16-
--preview-max-dimension: 480;
17-
}
18-
19-
&--small {
20-
width: 322px;
21-
--preview-max-dimension: 320;
22-
}
23-
24-
&--hidden {
25-
visibility: none;
26-
}
27-
2811
font-family: Roboto Flex;
29-
3012
font-style: normal;
3113
font-weight: 500;
3214
font-size: 16px;
@@ -50,6 +32,17 @@
5032
'YTFI' 738,
5133
'YTLC' 548,
5234
'YTUC' 712;
35+
36+
&--large {
37+
width: 482px;
38+
padding-bottom: 10px;
39+
--preview-max-dimension: 480;
40+
}
41+
42+
&--small {
43+
width: 322px;
44+
--preview-max-dimension: 320;
45+
}
5346
}
5447

5548
.preview-popUp__preview {
@@ -115,7 +108,7 @@
115108
margin-left: 2%;
116109
margin-top: 7px;
117110
flex-shrink: 0;
118-
@include item-type-colors();
111+
@include itemTypeColors.item-type-colors;
119112
}
120113

121114
.preview-popUp__element-with-time-info__text {
@@ -404,7 +397,7 @@
404397
}
405398

406399
& > * {
407-
@include item-type-colors();
400+
@include itemTypeColors.item-type-colors;
408401
}
409402

410403
.video-preview__label {

packages/webui/src/client/ui/PreviewPopUp/PreviewPopUp.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ export const PreviewPopUp = React.forwardRef<
1212
padding: Padding
1313
placement: Placement
1414
size: 'small' | 'large'
15-
hidden?: boolean
1615
preview?: React.ReactNode
1716
initialOffsetX?: number
1817
trackMouse?: boolean
1918
}>
2019
>(function PreviewPopUp(
21-
{ anchor, padding, placement, hidden, size, children, initialOffsetX, trackMouse },
20+
{ anchor, padding, placement, size, children, initialOffsetX, trackMouse },
2221
ref
2322
): React.JSX.Element {
2423
const [popperEl, setPopperEl] = useState<HTMLDivElement | null>(null)
@@ -110,7 +109,6 @@ export const PreviewPopUp = React.forwardRef<
110109
className={classNames('preview-popUp', {
111110
'preview-popUp--large': size === 'large',
112111
'preview-popUp--small': size === 'small',
113-
'preview-popUp--hidden': hidden,
114112
})}
115113
style={styles.popper}
116114
{...attributes.popper}

packages/webui/vite.config.mts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ export default defineConfig(({ command }) => ({
5959
},
6060
},
6161

62+
css: {
63+
preprocessorOptions: {
64+
scss: {
65+
// Silence deprecation warnings from Bootstrap and other dependencies
66+
// This hides warnings from dependencies but still shows warnings from our own code
67+
// Bootstrap 5.x not yet fully supporting Dart Sass 2.x causes many warnings
68+
quietDeps: true,
69+
},
70+
},
71+
},
72+
6273
define: {
6374
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
6475
},

0 commit comments

Comments
 (0)