|
14 | 14 | class='c-day' |
15 | 15 | :style='dayCellStyle'> |
16 | 16 | <!-- Background layers --> |
17 | | - <!-- <transition-group |
| 17 | + <transition-group |
18 | 18 | name='background' |
19 | 19 | tag='div' |
20 | | - class='c-day-backgrounds'> |
| 20 | + class='c-day-backgrounds c-day-layer'> |
21 | 21 | <div |
22 | 22 | v-for='background in backgrounds' |
23 | 23 | :key='background.key' |
|
27 | 27 | :style='background.style'> |
28 | 28 | </div> |
29 | 29 | </div> |
30 | | - </transition-group> --> |
| 30 | + </transition-group> |
31 | 31 | <!-- Content layer --> |
32 | | - <!-- <div |
33 | | - class='c-day-layer c-day-box-center-center'> |
34 | | - <div |
35 | | - ref='dayContent' |
36 | | - class='c-day-content' |
37 | | - :style='contentStyle' |
38 | | - @click='click' |
39 | | - @mouseenter='mouseenter' |
40 | | - @mouseover='mouseover' |
41 | | - @mouseleave='mouseleave'> |
42 | | - <slot name='day-content' |
43 | | - :day='day' |
44 | | - :attributes='attributesList'> |
45 | | - {{ day.label }} |
46 | | - </slot> |
47 | | - </div> |
48 | | - </div> --> |
49 | 32 | <div |
50 | | - class='day-content c-day-box-center-center' |
51 | | - :style='contentStyle' |
| 33 | + class='c-day-content-wrapper' |
52 | 34 | @click='click' |
53 | 35 | @mouseenter='mouseenter' |
54 | 36 | @mouseover='mouseover' |
55 | 37 | @mouseleave='mouseleave'> |
56 | | - <slot name='day-content' |
57 | | - :day='day' |
| 38 | + <slot |
| 39 | + name='day-content' |
| 40 | + :day='day' |
| 41 | + :content-style='contentStyle' |
58 | 42 | :attributes='attributesList'> |
59 | 43 | <div |
60 | | - class='c-day-box-center-center' |
61 | | - > |
62 | | - {{ day.label }} |
| 44 | + class='c-day-content' |
| 45 | + :style='contentStyle'> |
| 46 | + <div> |
| 47 | + {{ day.label }} |
| 48 | + </div> |
63 | 49 | </div> |
64 | 50 | </slot> |
65 | 51 | </div> |
@@ -607,8 +593,9 @@ export default { |
607 | 593 | flex: 1 |
608 | 594 |
|
609 | 595 | .c-day |
610 | | - min-height: $day-height |
611 | 596 | position: relative |
| 597 | + min-height: $day-min-height |
| 598 | + z-index: 1 |
612 | 599 |
|
613 | 600 | .c-day-layer |
614 | 601 | position: absolute |
@@ -636,11 +623,31 @@ export default { |
636 | 623 | .c-day-box-center-bottom |
637 | 624 | +box(center, flex-end) |
638 | 625 |
|
| 626 | +.c-day-content-wrapper |
| 627 | + display: flex |
| 628 | + justify-content: center |
| 629 | + align-items: center |
| 630 | + pointer-events: all |
| 631 | + user-select: none |
| 632 | + cursor: default |
| 633 | +
|
| 634 | +.c-day-content |
| 635 | + display: flex |
| 636 | + justify-content: center |
| 637 | + align-items: center |
| 638 | + width: $day-content-width |
| 639 | + height: $day-content-height |
| 640 | + font-size: $day-content-font-size |
| 641 | + font-weight: $day-content-font-weight |
| 642 | + line-height: 1 |
| 643 | + border-radius: $day-content-border-radius |
| 644 | + transition: all $day-content-transition-time |
| 645 | + margin: .1rem .08rem |
| 646 | +
|
639 | 647 | .c-day-backgrounds |
640 | | - position: relative |
641 | | - width: 100% |
642 | | - height: 100% |
643 | 648 | overflow: hidden |
| 649 | + pointer-events: none |
| 650 | + z-index: -1 |
644 | 651 | backface-visibility: hidden // Prevents glitches in Chrome by forcing hardware acceleration |
645 | 652 |
|
646 | 653 | .c-day-background |
@@ -677,19 +684,6 @@ export default { |
677 | 684 | background-color: $bar-background-color |
678 | 685 | transition: all $day-content-transition-time |
679 | 686 |
|
680 | | -.c-day-content |
681 | | - // +box() |
682 | | - // width: $day-content-width |
683 | | - // height: $day-content-height |
684 | | - font-size: $day-content-font-size |
685 | | - font-weight: $day-content-font-weight |
686 | | - line-height: 1 |
687 | | - border-radius: $day-content-border-radius |
688 | | - transition: all $day-content-transition-time |
689 | | - user-select: none |
690 | | - cursor: default |
691 | | - pointer-events: all |
692 | | -
|
693 | 687 | .c-day-popover-content |
694 | 688 | font-size: $day-popover-font-size |
695 | 689 | font-weight: $day-popover-font-weight |
|
0 commit comments