comand-component-library 3.1.66 → 3.1.69

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- /* global-styles.scss - last update: 2021/08/10 by Raphael Biock - IT IS NOT RECOMMENDED TO EDIT THIS FILE (TO AVOID TROUBLESHOOTING AFTER UPDATING) - DO CHANGES IN template.css ONLY */
1
+ /* global-styles.scss - last update: 2022/06/11 - IT IS NOT RECOMMENDED TO EDIT THIS FILE (TO AVOID TROUBLESHOOTING AFTER UPDATING) - DO CHANGES IN template.css ONLY */
2
2
 
3
3
  /* begin table of contents --------------------------------------------------------------------------------------------------------------------------------------------------- */
4
4
  /*
@@ -16,11 +16,16 @@
16
16
  P ------------------------
17
17
  - product-listing
18
18
 
19
+ T ------------------------
20
+ - tooltip
21
+
19
22
  - MEDIA QUERIES ------------------------
20
23
  - styles for medium screens
21
24
  - styles for small screens
22
25
 
23
- - DARK MODE ------------------------
26
+ - COLOR SCHEMES ------------------------
27
+ - custom light-mode
28
+ - custom dark-mode
24
29
  */
25
30
  /* end table of contents --------------------------------------------------------------------------------------------------------------------------------------------------- */
26
31
 
@@ -98,13 +103,13 @@ body.avoid-scrolling {
98
103
 
99
104
  &.products-squares {
100
105
  > a {
101
- grid-column: span 6;
106
+ grid-column: span calc(var(--grid-columns) / 2);
102
107
  }
103
108
  }
104
109
 
105
110
  &.products-lines {
106
111
  > a {
107
- grid-column: span 12;
112
+ grid-column: span var(--grid-columns);
108
113
  flex-direction: unset;
109
114
 
110
115
  img {
@@ -166,6 +171,8 @@ body.avoid-scrolling {
166
171
  }
167
172
  }
168
173
  /* end product-listing --------------------------------------------------------------------------------------------------------------------------------------------------- */
174
+
175
+ /* begin tooltip for cmd-form-element and cmd-fake-select ---------------------------------------------------------------------------------------------------------------- */
169
176
  .cmd-form-element, .cmd-fake-select {
170
177
  & + .cmd-tooltip {
171
178
  border-color: var(--status-color);
@@ -209,6 +216,7 @@ body.avoid-scrolling {
209
216
  }
210
217
  }
211
218
  }
219
+ /* end tooltip for cmd-form-element and cmd-fake-select ------------------------------------------------------------------------------------------------------------------ */
212
220
  /* ---------------------------------------------- END COMPONENTS AND GLOBAL STYLES -------------------------------------------------- */
213
221
 
214
222
  /* ---------------------------------------------- BEGIN MEDIA QUERIES AND BROWSER SPECIFIC STYLES -------------------------------------------------- */
@@ -261,51 +269,25 @@ body.avoid-scrolling {
261
269
  /* end styles for small screens --------------------------------------------------------------------------------------------------------------------------------------------------- */
262
270
  /* ---------------------------------------------- END MEDIA QUERIES AND BROWSER SPECIFIC STYLES -------------------------------------------------- */
263
271
 
264
- /* ---------------------------------------------- BEGIN DARK-MODE -------------------------------------------------- */
265
- @media (prefers-color-scheme: dark) {
266
- html {
267
- --dark-mode-background-color: rgb(50, 50, 50);
268
- scrollbar-color: var(--primary-color) var(--dark-gray); /* firefox only */
269
- }
270
-
271
- /* webkit only */
272
- html::-webkit-scrollbar-track {
273
- background-color: var(--dark-gray);
272
+ /* ---------------------------------------------- BEGIN COLORS-SCHEMES (LIGHT-/DARK-MODE) -------------------------------------------------- */
273
+ html {
274
+ &.light-mode {
275
+ /* assign default colors for custom light-mode set by class */
276
+ --color-scheme-text-color: var(--light-mode-text-color);
277
+ --color-scheme-background-color: var(--light-mode-background-color);
278
+ --color-scheme-text-color-inverted: var(--dark-mode-text-color);
279
+ --color-scheme-background-inverted: var(--dark-mode-background-color);
280
+ --default-background-color-lightness: 97%;
274
281
  }
275
282
 
276
- html, body,
277
- .cmd-site-header,
278
- .cmd-width-limitation-wrapper#site-footer {
279
- background: var(--dark-mode-background-color);
280
- color: var(--pure-white);
281
- }
282
-
283
- legend {
284
- background: var(--default-background-color);
285
- border: var(--default-border);
286
- }
287
-
288
- .cmd-breadcrumbs,
289
- .cmd-breadcrumbs > *,
290
- .cmd-top-header-navigation a,
291
- .cmd-pager > p, main {
292
- color: var(--pure-white);
293
- }
294
-
295
- hr {
296
- border-color: var(--pure-white);
297
- }
298
-
299
- .cmd-accordion,
300
- .cmd-tabs,
301
- fieldset, table, .box, {
302
- color: var(--text-color);
303
- }
304
-
305
- .cmd-accordion hr,
306
- .cmd-tabs hr,
307
- fieldset hr, table hr, .box hr {
308
- border-color: var(--text-color);
283
+ &.dark-mode {
284
+ /* assign default colors for custom dark-mode set by class */
285
+ --color-scheme-text-color: var(--dark-mode-text-color);
286
+ --color-scheme-background-color: var(--dark-mode-background-color);
287
+ --color-scheme-text-color-inverted: var(--light-mode-text-color);
288
+ --color-scheme-background-inverted: var(--light-mode-background-color);
289
+ --default-background-color-lightness: 20%;
309
290
  }
310
291
  }
311
- /* ---------------------------------------------- END DARK-MODE -------------------------------------------------- */
292
+
293
+ /* ---------------------------------------------- END COLORS-SCHEMES (LIGHT-/DARK-MODE) -------------------------------------------------- */
@@ -70,7 +70,7 @@ export default {
70
70
  text-decoration: none;
71
71
  z-index: 1000;
72
72
  border: var(--default-border);
73
- background: var(--pure-white);
73
+ background: var(--color-scheme-background-color);
74
74
  border-radius: var(--full-circle);
75
75
 
76
76
  &:hover, &:active, &:focus {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <!-- begin boxType 'content' -->
3
- <div v-if="boxType === 'content'" :class="['cmd-box box content', {open : open, collapsible: collapsible}]">
3
+ <div v-if="boxType === 'content'" :class="['cmd-box box content', {open : open, collapsible: collapsible, 'stretch-vertically': stretchVertically}]">
4
4
  <template v-if="useSlots?.includes('header')">
5
5
  <!-- begin collapsible header with slot -->
6
- <a v-if="collapsible" href="#" :title="open ? iconOpen.tooltip : iconClosed.tooltip" @click.prevent="toggleContentVisibility">
6
+ <a v-if="collapsible" class="box-header" href="#" :title="open ? iconOpen.tooltip : iconClosed.tooltip" @click.prevent="toggleContentVisibility">
7
7
  <!-- begin slot 'header' -->
8
8
  <slot name="header"></slot>
9
9
  <!-- end slot 'header' -->
@@ -12,16 +12,16 @@
12
12
  <!-- end collapsible header with slot -->
13
13
 
14
14
  <!-- begin default header with slot -->
15
- <header v-else>
15
+ <div v-else class="box-header">
16
16
  <!-- begin slot 'header' -->
17
17
  <slot name="header"></slot>
18
18
  <!-- end slot 'header' -->
19
- </header>
19
+ </div>
20
20
  <!-- end default header with slot -->
21
21
  </template>
22
22
  <template v-else>
23
23
  <!-- begin header for collapsible -->
24
- <a v-if="collapsible" href="#" :title="open ? iconOpen.tooltip : iconClosed.tooltip" @click.prevent="toggleContentVisibility">
24
+ <a v-if="collapsible" class="box-header" href="#" :title="open ? iconOpen.tooltip : iconClosed.tooltip" @click.prevent="toggleContentVisibility">
25
25
  <!-- begin CmdCustomHeadline -->
26
26
  <CmdCustomHeadline v-if="cmdCustomHeadline?.headlineText"
27
27
  v-bind="cmdCustomHeadline"/>
@@ -32,7 +32,9 @@
32
32
 
33
33
  <!-- begin CmdCustomHeadline -->
34
34
  <CmdCustomHeadline v-else-if="!collapsible && cmdCustomHeadline?.headlineText"
35
- v-bind="cmdCustomHeadline"/>
35
+ class="box-header"
36
+ v-bind="cmdCustomHeadline"
37
+ />
36
38
  <!-- end CmdCustomHeadline -->
37
39
  </template>
38
40
 
@@ -48,17 +50,17 @@
48
50
  </div>
49
51
  <!-- end box-body -->
50
52
 
51
- <footer v-if="useSlots?.includes('footer')">
53
+ <div v-if="useSlots?.includes('footer')" class="box-footer">
52
54
  <!-- begin slot 'footer' -->
53
55
  <slot name="footer"></slot>
54
56
  <!-- end slot 'footer' -->
55
- </footer>
57
+ </div>
56
58
  </div>
57
59
  <!-- end boxType 'content' -->
58
60
 
59
61
  <!-- begin boxType 'product' -->
60
- <a v-else-if="boxType === 'product' && product" class="cmd-box box product" href="#" @click.prevent="clickOnProduct(product)">
61
- <div>
62
+ <a v-else-if="boxType === 'product' && product" :class="['cmd-box box product', {'stretch-vertically': stretchVertically}]" href="#" @click.prevent="clickOnProduct(product)">
63
+ <div class="box-header flex-container vertical">
62
64
  <img v-if="product.image" :src="product.image.src" :alt="product.image.alt"/>
63
65
  <div class="ribbon-new" v-if="product.new">
64
66
  <span>{{ getMessage("cmdbox.productbox.new") }}</span>
@@ -81,8 +83,8 @@
81
83
  <!-- end boxType 'product' -->
82
84
 
83
85
  <!-- begin boxType 'user' -->
84
- <div v-else-if="boxType === 'user' && user" class="cmd-box box user">
85
- <div>
86
+ <div v-else-if="boxType === 'user' && user" :class="['cmd-box box user', {'stretch-vertically': stretchVertically}]">
87
+ <div class="box-header">
86
88
  <img v-if="user.image" :src="user.image.src" :alt="user.image.alt"/>
87
89
  <div v-else :class="defaultProfileIconClass" :title="user.name"></div>
88
90
  <!-- begin CmdCustomHeadline -->
@@ -96,9 +98,9 @@
96
98
  <p v-if="user.position">{{ user.position }}</p>
97
99
  <p v-if="user.description" class="description">{{ user.description }}</p>
98
100
  </div>
99
- <footer v-if="user.links">
101
+ <div v-if="user.links" class="box-footer">
100
102
  <CmdListOfLinks :links="user.links" orientation="horizontal" :useGap="false"/>
101
- </footer>
103
+ </div>
102
104
  </div>
103
105
  <!-- end boxType 'user' -->
104
106
  </template>
@@ -233,6 +235,13 @@ export default {
233
235
  }
234
236
  }
235
237
  },
238
+ /**
239
+ * allow box to be stretched as high as parent-element
240
+ */
241
+ stretchVertically: {
242
+ type: Boolean,
243
+ default: true
244
+ },
236
245
  /**
237
246
  * properties for CmdCustomHeadline-component
238
247
  */
@@ -288,6 +297,10 @@ export default {
288
297
  padding: var(--default-padding);
289
298
  }
290
299
 
300
+ &.stretch-vertically {
301
+ height: 100%;
302
+ }
303
+
291
304
  &.content {
292
305
  > * {
293
306
  > *:last-child {
@@ -299,7 +312,7 @@ export default {
299
312
  }
300
313
  }
301
314
 
302
- > header, > a {
315
+ > .box-header, > a {
303
316
  display: flex;
304
317
  align-items: center;
305
318
  border-top-left-radius: var(--border-radius);
@@ -324,7 +337,7 @@ export default {
324
337
  }
325
338
 
326
339
  .box-body {
327
- height: 100%;
340
+ flex-grow: 1;
328
341
  padding: 0;
329
342
 
330
343
  .padding {
@@ -367,7 +380,7 @@ export default {
367
380
  }
368
381
  }
369
382
 
370
- footer {
383
+ .box-footer {
371
384
  border-bottom-left-radius: var(--border-radius);
372
385
  border-bottom-right-radius: var(--border-radius);
373
386
  padding: var(--default-padding);
@@ -425,7 +438,7 @@ export default {
425
438
  }
426
439
  }
427
440
 
428
- > div:first-child {
441
+ > .box-header {
429
442
  > img, > div {
430
443
  display: table;
431
444
  margin: 0 auto;
@@ -433,6 +446,8 @@ export default {
433
446
  }
434
447
 
435
448
  .box-body {
449
+ flex-grow: 1;
450
+
436
451
  > * {
437
452
  text-align: center;
438
453
  }
@@ -449,11 +464,10 @@ export default {
449
464
  }
450
465
 
451
466
  &.user {
452
- > div:first-child {
467
+ > .box-header {
453
468
  padding: var(--default-padding);
454
- background: var(--pure-white);
455
469
 
456
- > img, > div {
470
+ > img, > div:first-child {
457
471
  display: table;
458
472
  margin: 0 auto;
459
473
  padding: calc(var(--default-padding) * 3);
@@ -465,6 +479,8 @@ export default {
465
479
  }
466
480
 
467
481
  .box-body {
482
+ flex-grow: 1;
483
+
468
484
  p {
469
485
  text-align: center;
470
486
  font-weight: bold;
@@ -479,13 +495,13 @@ export default {
479
495
  }
480
496
  }
481
497
 
482
- footer {
498
+ .box-footer {
483
499
  margin-top: auto;
484
500
  border-top: var(--default-border);
485
501
 
486
-
487
502
  .cmd-list-of-links {
488
503
  ul {
504
+ width: 100%;
489
505
  margin-bottom: 0;
490
506
 
491
507
  li {
@@ -495,7 +511,7 @@ export default {
495
511
  flex: 1;
496
512
  padding: var(--default-padding);
497
513
  text-align: center;
498
- background: var(--pure-white);
514
+ background: var(--color-scheme-background-color);
499
515
  border-left: var(--default-border);
500
516
  }
501
517