-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollapsibleSection.css
More file actions
157 lines (144 loc) · 5.8 KB
/
Copy pathCollapsibleSection.css
File metadata and controls
157 lines (144 loc) · 5.8 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/* ==================================================================================== */
/* File: CollapsibleSection.css
Author: ndecker
Description: The CollapsibleSection is a BBj custom class that creates an accordion-style collapsible control in the BBj Dynamic Web Client from standard BBj controls. */
/* ==================================================================================== */
/* ==================================================================================== */
/* The control's outer window */
/* ==================================================================================== */
.collapsibleSectionControl.BBjSimpleWindow,
dwc-panel.collapsibleSectionControl
{
overflow: visible;
display: flex;
flex-direction: column;
width: calc(100% - (2 * var(--dwc-focus-ring-width, 0)));
height: min-content;
margin: var(--dwc-focus-ring-width);
padding: var(--dwc-focus-ring-width, 0.25em);
border-style: var(--dwc-border-style, solid);
border-width: var(--dwc-border-width, thin);
border-color: transparent;
border-radius: var(--dwc-border-radius, 0.25em);
box-shadow: 0 0 0 var(--dwc-focus-ring-width) transparent;
transition: background-color var(--dwc-transition, 250ms) ease, border-color var(--dwc-transition, 250ms) ease;
}
.collapsibleSectionControl.expanded {
background-color: var(--dwc-color-default);
}
.collapsibleSectionControl.collapsed {
background-color: var(--dwc-color-default-dark);
}
@media (hover: hover) {
.collapsibleSectionControl:hover {
background-color: var(--dwc-color-default-light);
border-color: var(--dwc-border-color-default);
}
}
/* ==================================================================================== */
/* The control's top section with the title, separator, and disclosure */
/* ==================================================================================== */
.collapsibleSectionTopContainer {
display: grid;
grid-template-areas: "title separator disclosure";
grid-template-columns: auto 1px min-content;
align-items: center;
width: 100%;
height: fit-content;
overflow: hidden;
border-radius: var(--dwc-border-radius, 0.25em);
cursor: var(--dwc-cursor-click);
background-color: inherit;
}
/* ==================================================================================== */
/* The control's title in the top section */
/* ==================================================================================== */
.collapsibleSectionTitle {
grid-area: title;
padding-left: 0.1em;
font-weight: 700;
display: inline-flex;
align-items: center;
transition: color var(--dwc-transition, 250ms) ease;
}
.collapsibleSectionControl.expanded .collapsibleSectionTitle {
color: var(--dwc-color-primary-text-dark);
}
.collapsibleSectionControl.collapsed .collapsibleSectionTitle {
color: var(--dwc-color-gray-text-dark);
}
@media (hover: hover) {
.collapsibleSectionControl:hover .collapsibleSectionTitle {
color: var(--dwc-color-primary-text-light);
}
}
/* ==================================================================================== */
/* The control's separator in the top section */
/* ==================================================================================== */
.collapsibleSectionSeparator {
grid-area: separator;
background-color: var(--dwc-color-default-dark);
width: 1px;
margin-top: var(--dwc-space-xs);
margin-bottom: var(--dwc-space-xs);
align-self: stretch;
}
/* ==================================================================================== */
/* The control's disclosure in the top section */
/* ==================================================================================== */
.collapsibleSectionDisclosure {
grid-area: disclosure;
display: flex;
padding: 2px 8px;
height: fit-content;
justify-self: end;
transition: transform var(--dwc-transition, 250ms) ease-in-out, color var(--dwc-transition, 250ms) ease-in-out;
}
.collapsibleSectionControl.expanded .collapsibleSectionDisclosure {
color: var(--dwc-color-primary-text-dark);
transform: rotate(0deg);
}
.collapsibleSectionControl.collapsed .collapsibleSectionDisclosure {
color: var(--dwc-color-gray-text-dark);
transform: rotate(-180deg);
}
@media (hover: hover) {
.collapsibleSectionControl:hover .collapsibleSectionDisclosure {
color: var(--dwc-color-primary-text-light);
}
}
/* ==================================================================================== */
/* The control's wrapper that changes height to collapse and expand */
/* ==================================================================================== */
.collapsibleSectionControlWrapper {
overflow: hidden;
max-height: auto;
display: grid;
transition: height var(--dwc-transition, 250ms) ease-in-out;
background: inherit;
}
/* ==================================================================================== */
/* The control's container that holds all the BBjControls */
/* ==================================================================================== */
.collapsibleSectionControlContainer.BBjSimpleWindow,
dwc-panel.collapsibleSectionControlContainer
{
overflow: hidden;
padding: calc(var(--dwc-focus-ring-width, 0.25em) * 2);
display: inline-flex;
flex-direction: column;
gap: var(--dwc-space);
align-items: stretch;
width: 100%;
height: fit-content;
margin-top: 5px;
border-color: transparent;
border-radius: var(--dwc-border-radius, 0.25em);
background-color: var(--dwc-window-background);
transition: background-color var(--dwc-transition, 250ms) ease;
}
@media (hover: hover) {
.collapsibleSectionControl:hover .collapsibleSectionControlContainer {
background-color: var(--dwc-window-background);
}
}