-
Notifications
You must be signed in to change notification settings - Fork 345
Expand file tree
/
Copy pathContentSidebar.scss
More file actions
98 lines (83 loc) · 2.54 KB
/
ContentSidebar.scss
File metadata and controls
98 lines (83 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@import '../common/variables';
$sidebarTabsWidth: 60px;
$sidebarWidth: $sidebarTabsWidth + $sidebarContentWidth;
$sidebarIncreasedWidth: $sidebarTabsWidth + $sidebarContentIncreasedWidth;
$sidebarDefaultErrorWidth: $sidebarContentWidth - 16px; // 16px is the compined 8px left and right margin on the .be-default-error
$sidebarDefaultErrorIncreasedWidth: $sidebarContentIncreasedWidth - 16px;
.be {
&.bcs {
position: relative;
display: flex;
width: auto;
min-width: $sidebarTabsWidth;
max-width: $sidebarWidth;
background-color: $white;
&.bcs-is-wider {
max-width: $sidebarIncreasedWidth;
}
// When resizable, the default min-width is the un-resized sidebar width.
// Inline style on the aside element overrides the default max-width to allow grow.
&.bcs-is-resizable.bcs-is-open {
min-width: $sidebarWidth;
&.bcs-is-wider {
min-width: $sidebarIncreasedWidth;
}
}
}
.bcs-loading {
display: flex;
flex: 1;
align-items: center;
width: 10px;
margin: 0 auto;
font-size: 0;
white-space: nowrap;
}
.be-default-error {
min-width: $sidebarDefaultErrorWidth;
}
&.bcs-is-open {
.bcs-loading {
width: $sidebarWidth;
}
}
&.bcs-is-wider {
.be-default-error {
min-width: $sidebarDefaultErrorIncreasedWidth;
}
&.bcs-is-open {
.bcs-loading {
width: $sidebarIncreasedWidth;
}
}
}
}
@include breakpoint($medium-screen) {
.be {
&.bcs {
flex-basis: 100%;
flex-direction: column;
width: 100%;
min-width: 0;
max-width: none;
max-height: 48px;
transition: max-height 0.5s ease-in-out 0s;
&.bcs-is-wider {
max-width: none;
}
// Neutralize resizable overrides on small screens — sidebar is a bottom sheet here
&.bcs-is-resizable.bcs-is-open {
min-width: 0;
&.bcs-is-wider {
min-width: 0;
}
}
}
&.bcs-is-open {
position: absolute;
bottom: 0;
z-index: 5; // Stack sidebar above annotations. See z-index values https://github.com/box/box-annotations/blob/master/src/common/BaseAnnotator.scss
max-height: 100%;
}
}
}