Skip to content

Commit 60763d8

Browse files
authored
fix sidebar for settings, logs and blueprint gallery (#1964)
1 parent 65c4a92 commit 60763d8

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

packages/playground/website/src/components/layout/style.module.css

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
:root {
22
--site-manager-site-list-width: 320px;
3-
--site-manager-site-info-min-width: 350px;
3+
--site-manager-site-info-min-width: 555px;
44
--site-manager-width-desktop: calc(
55
var(--site-manager-site-list-width) +
6-
var(--site-manager-site-info-min-width)
6+
var(--site-manager-site-info-min-width) +
7+
2 * var(--site-manager-border-width)
78
);
89
--site-view-min-width: 320px;
910
--site-manager-background-color: #1e1e1e;
1011
--site-manager-border-width: 12px;
1112
--site-manager-border-radius: 12px;
1213
}
1314

15+
@media screen and (max-width: 890px) {
16+
:root {
17+
--site-manager-site-info-min-width: 60%;
18+
}
19+
}
20+
1421
body {
1522
background-color: var(--site-manager-background-color);
1623
}
@@ -27,7 +34,7 @@ body {
2734
}
2835

2936
.site-manager-wrapper {
30-
max-width: 1300px;
37+
max-width: var(--site-manager-width-desktop);
3138
@media (max-width: 875px) {
3239
min-width: 0;
3340
width: 100%;
@@ -43,13 +50,13 @@ body {
4350
.site-manager-wrapper-enter-active {
4451
opacity: 1;
4552
transform: none;
46-
max-width: 1300px;
53+
max-width: var(--site-manager-width-desktop);
4754
@media (max-width: 875px) {
4855
width: 100%;
4956
}
5057
}
5158

52-
/*
59+
/*
5360
* Repeated rule to ensure it's more specific than
5461
* .site-manager-wrapper-exit
5562
*/
@@ -60,8 +67,8 @@ body {
6067

6168
.site-manager-wrapper-exit-active,
6269
.site-manager-wrapper-enter-active {
63-
transition:
64-
/*
70+
transition:
71+
/*
6572
* Workaround: Animate max-width to allow `width: auto`
6673
* The `width` property needs to be `auto` to ensure the
6774
* site manager panel expands and shrinks with its content.
@@ -134,7 +141,7 @@ body {
134141

135142
/*
136143
* Unfortunately we cannot use calc() in media queries.
137-
*
144+
*
138145
* 1166px = --site-manager-width + --site-view-min-width
139146
*
140147
* This manual calculation ensures the site view gets hidden

packages/playground/website/src/components/site-manager/blueprints-panel/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function BlueprintsPanel({
220220
</FlexItem>
221221
) : (
222222
<FlexItem
223-
style={{ alignSelf: 'stretch', overflowY: 'scroll' }}
223+
style={{ alignSelf: 'stretch' }}
224224
>
225225
<DataViews<BlueprintsIndexEntry>
226226
data={indexEntries as BlueprintsIndexEntry[]}

packages/playground/website/src/components/site-manager/blueprints-panel/style.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
flex-grow: 1;
1111

1212
&:not(.is-mobile) {
13-
width: 500px;
13+
width: var(--site-manager-site-info-min-width);
1414
}
1515

1616
/* Hide the Blueprint thumbnail. It doesn't seem possible with the component props. */

0 commit comments

Comments
 (0)