-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathpf-accordion-header.css
More file actions
169 lines (155 loc) · 5.45 KB
/
pf-accordion-header.css
File metadata and controls
169 lines (155 loc) · 5.45 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
158
159
160
161
162
163
164
165
166
167
168
169
:host {
--pf-icon--size: var(--pf-c-accordion__toggle--IconSize, 10px);
/**
* Sets the font color for the accordion header.
*/
color: var(--pf-c-accordion__toggle--Color, var(--pf-global--Color--100, #151515));
background-color: var(--pf-global--BackgroundColor--100, #ffffff);
}
:host([large]) {
/** Sets the top padding for the accordion header. */
--pf-c-accordion__toggle--PaddingTop: var(--pf-global--spacer--md, 1rem);
/** Sets the right padding for the accordion header. */
--pf-c-accordion__toggle--PaddingRight: var(--pf-global--spacer--md, 1rem);
/** Sets the bottom padding for the accordion header. */
--pf-c-accordion__toggle--PaddingBottom: var(--pf-global--spacer--md, 1rem);
/** Sets the left padding for the accordion header. */
--pf-c-accordion__toggle--PaddingLeft: var(--pf-global--spacer--lg, 1.5rem);
/** Sets the font family for the accordion header. */
--pf-c-accordion__toggle--FontFamily:
var(--pf-global--FontFamily--redhat-updated--heading--sans-serif,
"RedHatDisplayUpdated",
"Overpass",
overpass,
helvetica,
arial,
sans-serif
);
/** Sets the font size for the accordion header. */
--pf-c-accordion__toggle--FontSize: var(--pf-global--FontSize--xl, 1.25rem);
--pf-c-accordion__toggle--hover-text--Color: var(--pf-global--Color--100, #151515);
--pf-c-accordion__toggle--active-text--Color: var(--pf-global--Color--100, #151515);
--pf-c-accordion__toggle--active-text--FontWeight: var(--pf-global--FontWeight--normal, 400);
--pf-c-accordion__toggle--focus-text--Color: var(--pf-global--Color--100, #151515);
--pf-c-accordion__toggle--focus-text--FontWeight: var(--pf-global--FontWeight--normal, 400);
--pf-c-accordion__toggle--expanded-text--Color: var(--pf-global--Color--100, #151515);
--pf-c-accordion__toggle--expanded-text--FontWeight: var(--pf-global--FontWeight--normal, 400);
--pf-icon--size: var(--pf-c-accordion__toggle--IconSize, 12px);
}
#heading {
font-weight: var(--pf-c-accordion__toggle--FontWeight, var(--pf-global--FontWeight--normal, 400));
font-size: 100%;
padding: 0;
margin: 0;
}
button,
a {
cursor: pointer;
}
.toggle,
.toggle:before,
.toggle:after {
padding: 0;
margin: 0;
/** Sets the background color for the accordion header toggle element. */
background-color: var(--pf-c-accordion__toggle--BackgroundColor, transparent);
}
.icon {
/**
* Sets the transition animation for the accordion header.
*/
transition: var(--pf-c-accordion__toggle-icon--Transition, 0.2s ease-in 0s);
}
.toggle {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
border: 0;
padding:
var(--pf-c-accordion__toggle--PaddingTop, var(--pf-global--spacer--md, 0.5rem))
var(--pf-c-accordion__toggle--PaddingRight, var(--pf-global--spacer--md, 1rem))
var(--pf-c-accordion__toggle--PaddingBottom, var(--pf-global--spacer--sm, 0.5rem))
var(--pf-c-accordion__toggle--PaddingLeft, var(--pf-global--spacer--md, 1rem));
font-family:
var(--pf-c-accordion__toggle--FontFamily,
var(--pf-global--FontFamily--redhat-updated--heading--sans-serif,
"RedHatTextUpdated",
helvetica,
arial,
sans-serif));
font-size: var(--pf-c-accordion__toggle--FontSize, var(--pf-global--FontSize--lg, 1rem));
/**
* Sets the font weight for the accordion header.
*/
font-weight: var(--pf-c-accordion__toggle--FontWeight, var(--pf-global--FontWeight--normal, 400));
color: var(--pf-c-accordion__toggle--Color, var(--pf-global--Color--100, #151515));
}
.toggle[aria-expanded="true"] {
--pf-c-accordion__toggle--after--BackgroundColor:
/**
* Sets the hover expanded before background color for the accordion header.
*/
var(
--pf-c-accordion__toggle--expanded--before--BackgroundColor,
var(
--pf-global--primary-color--100,
#0066cc
)
);
}
.toggle:after {
top: var(--pf-c-accordion__toggle--before--Top, -1px);
/**
* Sets the sidebar width for the accordion header.
*/
width: var(--pf-c-accordion__toggle--before--Width, var(--pf-global--BorderWidth--lg, 3px));
/**
* Sets the background color for the after element for the accordion header toggle element.
*/
background-color: var(--pf-c-accordion__toggle--after--BackgroundColor, transparent);
content: "";
position: absolute;
bottom: 0;
left: 0;
}
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
/**
* Sets the max width for the text inside the accordion header.
*/
max-width: var(--pf-c-accordion__toggle-text--MaxWidth,
calc(100% - var(--pf-global--spacer--lg, 1.5rem)));
}
.toggle[aria-expanded="true"] .icon {
/**
* Sets the expanded icon rotation degrees for the accordion header.
*/
rotate: var(--pf-c-accordion__toggle--expanded-icon--Rotate, 90deg);
}
.toggle:hover,
.toggle:active,
.toggle:focus {
/**
* Sets the active background color for the accordion header.
*/
background-color:
var(--pf-c-accordion__toggle--active--BackgroundColor,
var(--pf-global--BackgroundColor--200, #f0f0f0));
}
.toggle:hover span,
.toggle:focus span,
.toggle:active span {
/**
* Sets the active text color for the accordion header.
*/
color: var(--pf-c-accordion__toggle--active-text--Color, var(--pf-global--link--Color, #0066cc));
}
.toggle:focus span,
.toggle:active span {
font-weight: var(--pf-c-accordion__toggle--active-text--FontWeight,
var(--pf-global--FontWeight--semi-bold, 700));
}