calendar.scss 1.39 KB
Newer Older
YazhouChen's avatar
YazhouChen committed
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
@import "mixins/mixins";
@import "common/var";
@import "button";
@import "button-group";

@include b(calendar) {
  background-color:#fff;

  @include e(header) {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: $--table-border;
  }

  @include e(title) {
    color: #000000;
    align-self: center;
  }

  @include e(body) {
    padding: 12px 20px 35px;
  }
}

@include b(calendar-table) {
  table-layout: fixed;
  width: 100%;

  thead th {
    padding: 12px 0;
    color: $--color-text-regular;
    font-weight: normal;
  }

  &:not(.is-range) {
    td.prev,
    td.next {
      color: $--color-text-placeholder;
    }
  }

  td {
    border-bottom: $--calendar-border;
    border-right: $--calendar-border;
    vertical-align: top;
    transition: background-color 0.2s ease;

    @include when(selected) {
      background-color: $--calendar-selected-background-color;
    }

    @include when(today) {
      color: $--color-primary;
    }
  }

  tr:first-child td {
    border-top: $--calendar-border;
  }

  tr td:first-child {
    border-left: $--calendar-border;
  }

  tr.el-calendar-table__row--hide-border td {
    border-top: none;
  }

  @include b(calendar-day) {
    box-sizing: border-box;
    padding: 8px;
    height: $--calendar-cell-width;
    &:hover {
      cursor: pointer;
      background-color: $--calendar-selected-background-color;
    }
  }
}