Fixed box css class name being incorrectly handled
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / layout / box.scss
CommitLineData
bb6ef47e
MW
1/* default styling for all boxes */
2.box {
3 box-sizing: border-box;
4}
5
6.boxImage {
7 img {
8 max-width: 100%;
9 }
10}
11
12.boxTitle {
13 @extend .wcfFontHeadline;
14
15 & + .boxContent {
16 margin-top: 10px;
17 }
18}
19
20.boxContent {
21 & + .boxContent,
22 & + .boxTitle {
23 margin-top: 20px;
24 }
25}
26
27/* styling for boxes in <hero> position */
28.boxesHero {
29 .box {
30 padding: 40px;
31 text-align: center;
32 }
33
34 .boxTitle {
35 @extend .wcfFontTitle;
36
37 & + .boxContent {
38 margin-top: 20px;
39 }
40 }
41
42 .boxWithImage {
43 display: flex;
44 flex-wrap: wrap;
45
46 .boxImage,
47 .boxTitle,
48 .boxContent {
49 flex: 0 0 100%;
50 }
51
52 .boxImage {
53 order: 3;
54 margin-top: 40px;
55 }
56 }
57}
58
59/* styling for boxes in <headerBoxes> position */
60.boxesHeaderBoxes {
61 background-color: rgb(247, 248, 250); // @todo
62
c734a302 63 .boxContainer {
bb6ef47e
MW
64 display: flex;
65 flex-wrap: wrap;
c734a302
MW
66 margin-left: -10px;
67 margin-right: -10px;
bb6ef47e
MW
68 padding: 40px 0;
69 }
70
71 .box {
72 flex: 0 0 25%;
bb6ef47e 73 padding-left: 10px;
c734a302
MW
74 padding-right: 10px;
75
bb6ef47e
MW
76 &:nth-child(4n+1):not(:first-child) {
77 margin-top: 20px;
78 }
79
80 /* one item */
81 &:first-child:nth-last-child(1) {
82 flex-basis: 100%;
83 }
84
85 /* two items */
86 &:first-child:nth-last-child(2),
87 &:first-child:nth-last-child(2) ~ .box {
88 flex-basis: 50%;
89 }
90
91 /* three items */
92 &:first-child:nth-last-child(3),
93 &:first-child:nth-last-child(3) ~ .box {
94 flex-basis: 33.3333%;
95 }
96 }
97
98 .boxImage {
99 margin-bottom: 10px;
100 text-align: center;
101 }
102}
103
104/* styling for boxes in <top>/<bottom> position */
105.boxesTop,
106.boxesBottom {
107 border-bottom: 1px solid $wcfContentBorderInner;
108
109 .layoutBoundary {
110 padding: 40px 0;
111 }
112
113 .box {
114 &:not(:first-child) {
115 margin-top: 40px;
116 }
117 }
118
119 .boxWithImage {
120 @extend .clearfix;
121
122 .boxTitle,
123 .boxContent {
124 margin-left: calc(20% + 30px);
125 }
126 }
127
128 .boxImage {
129 float: left;
130 width: 20%;
131 }
132}
133
134.boxesTop {
135 border-bottom: 1px solid $wcfContentBorderInner;
136}
137
138.boxesBottom {
139 border-top: 1px solid $wcfContentBorderInner;
140}
141
142/* styling for boxes in <sidebarLeft>/<sidebarRight> position */
143.boxesSidebarLeft,
144.boxesSidebarRight {
145 color: $wcfSidebarText;
146
147 a {
148 color: $wcfSidebarLink;
149
150 > .icon {
151 color: $wcfSidebarLink;
152 }
153
154 &:hover {
155 color: $wcfSidebarLinkActive;
156
157 > .icon {
158 color: $wcfSidebarLinkActive;
159 }
160 }
161 }
162
163 small,
164 .dimmed {
165 color: $wcfSidebarDimmedText;
166
167 a {
168 color: $wcfSidebarDimmedLink;
169
170 &:hover {
171 color: $wcfSidebarDimmedLinkActive;
172 }
173 }
174 }
175
176 .box {
177 background-color: $wcfSidebarBackground;
178 padding: 20px;
179
180 &:not(:first-child) {
181 margin-top: 20px;
182 }
183 }
184
185 .boxWithImage {
186 @extend .clearfix;
187
188 .boxTitle,
189 .boxContent {
190 margin-left: calc(20% + 10px);
191 }
192 }
193
194 .boxImage {
195 float: left;
196 width: 20%;
197 }
198}
199
200/* styling for boxes in <contentTop>/<contentBottom> position */
201.boxesContentTop,
202.boxesContentBottom {
203 .boxTitle {
204 color: $wcfContentHeadlineText;
205
206 a {
207 color: $wcfContentHeadlineLink;
208
209 &:hover {
210 color: $wcfContentHeadlineLinkActive;
211 }
212 }
213 }
214
215 .box {
216 &:not(:first-child) {
217 margin-top: 30px;
218 }
219 }
220
221 .boxWithImage {
222 @extend .clearfix;
223
224 .boxTitle,
225 .boxContent {
226 margin-left: calc(20% + 20px);
227 }
228 }
229
230 .boxImage {
231 float: left;
232 width: 20%;
233 }
234}
235
236.boxesContentTop {
237 margin-bottom: 40px;
238}
239
240.boxesContentBottom {
241 margin-top: 40px;
242}
243
244/* styling for boxes in <footerBoxes> position */
245.boxesFooterBoxes {
246 background-color: $wcfFooterBoxBackground;
247 color: $wcfFooterBoxText;
248 flex: 0 0 auto;
249 z-index: 40;
250
251 a {
252 color: $wcfFooterBoxLink;
253
254 .icon {
255 color: $wcfFooterBoxLink;
256 }
257
258 &:hover {
259 color: $wcfFooterBoxLinkActive;
260
261 .icon {
262 color: $wcfFooterBoxLinkActive;
263 }
264 }
265 }
266
267 .icon {
268 color: $wcfFooterBoxText;
269 }
270
c734a302 271 .boxContainer {
bb6ef47e
MW
272 display: flex;
273 flex-wrap: wrap;
c734a302
MW
274 margin-left: -10px;
275 margin-right: -10px;
bb6ef47e
MW
276 padding: 40px 0;
277 }
278
279 .box {
280 flex: 0 0 50%;
c734a302
MW
281 padding-left: 10px;
282 padding-right: 10px;
bb6ef47e
MW
283
284 &:nth-child(n+3) {
285 margin-top: 40px;
286 }
bb6ef47e
MW
287 }
288
289 .boxImage {
290 margin-bottom: 10px;
291 text-align: center;
292 }
293}
294
295/* styling for boxes in <footer> position */
296.boxesFooter {
297 margin-bottom: 40px;
298
299 .box {
300 &:not(:first-child) {
301 margin-top: 40px;
302 }
303 }
304
305 .boxWithImage {
306 @extend .clearfix;
307
308 .boxTitle,
309 .boxContent {
310 margin-left: calc(20% + 30px);
311 }
312 }
313
314 .boxImage {
315 float: left;
316 width: 20%;
317 }
318}