_Daylight.scss 3.25 KB
Newer Older
杨思琦's avatar
杨思琦 committed
1 2
@use "sass:color";

3 4 5
@mixin daylight() {
  @keyframes pulse {
    to {
杨思琦's avatar
杨思琦 committed
6
      box-shadow: 0 0 0 12px rgb(232 76 61 / 0%);
7 8 9 10
    }
  }

  .esri-daylight {
杨思琦's avatar
杨思琦 committed
11
    @include timeSlider();
12 13

    display: flex;
杨思琦's avatar
杨思琦 committed
14
    flex-basis: auto;
15 16
    flex-direction: column;
    flex-shrink: 0;
杨思琦's avatar
杨思琦 committed
17
    gap: $cap-spacing;
18
    justify-content: space-between;
杨思琦's avatar
杨思琦 committed
19 20
    padding: var(--esri-widget-padding);
    width: 350px;
21

杨思琦's avatar
杨思琦 committed
22
    &__anchor {
23 24 25
      font-size: $font-size--small;
    }

杨思琦's avatar
杨思琦 committed
26
    &__panel--error {
27 28 29 30
      padding: 0 $side-spacing;
      animation: esri-fade-in 250ms ease-in-out;
    }

杨思琦's avatar
杨思琦 committed
31
    &__container {
32 33
      display: flex;
      flex-direction: row;
杨思琦's avatar
杨思琦 committed
34
      gap: $side-spacing;
35
      align-items: center;
杨思琦's avatar
杨思琦 committed
36
      justify-content: space-between;
37 38
    }

杨思琦's avatar
杨思琦 committed
39 40 41
    .esri-date-picker,
    &__season-picker {
      flex-grow: 1;
42 43
    }

杨思琦's avatar
杨思琦 committed
44 45 46
    .esri-date-picker__calendar-toggle {
      height: 32px;
      font-size: $font-size--small;
47 48
    }

杨思琦's avatar
杨思琦 committed
49 50 51
    &__container--disabled .esri-date-picker {
      opacity: $opacity--disabled;
      pointer-events: none;
52 53
    }

杨思琦's avatar
杨思琦 committed
54 55
    &__play-pause-button {
      flex: 0;
56 57
    }

杨思琦's avatar
杨思琦 committed
58 59
    .esri-slider.esri-slider--horizontal .esri-slider__thumb {
      $thumb-size: 27px;
60

杨思琦's avatar
杨思琦 committed
61 62 63 64 65 66 67 68
      top: -$thumb-size * 0.5;
      left: -$thumb-size * 0.5;
      border: 7px solid #0079c14d;
      background-clip: padding-box;
      background-color: $button-color;
      background-position: 0 0 !important;
      width: $thumb-size;
      height: $thumb-size;
69

杨思琦's avatar
杨思琦 committed
70 71 72 73 74
      &:hover,
      &:active,
      &:focus {
        background-color: $button-color--hover;
      }
75 76
    }

杨思琦's avatar
杨思琦 committed
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
    .esri-slider.esri-slider--horizontal {
      z-index: 1;

      .esri-slider-with-dropdown__box {
        display: flex;
        gap: $cap-spacing--eighth;
        align-items: center;
        z-index: 1;
        margin: 0;
        margin-top: -$cap-spacing--three-quarters;
        min-width: inherit;
        text-align: center;
        white-space: nowrap;
        font-size: $font-size--tiny-time-slider;
        will-change: left;

        .esri-slider__label {
          display: inline-block;
          position: static;
          inset-inline-start: auto;
          margin: 0;
          outline: none;
          min-width: auto;
          list-style: none;
          line-height: 1em;
          font-variant-numeric: tabular-nums;
        }
104

杨思琦's avatar
杨思琦 committed
105 106 107
        .esri-slider__tick-label {
          line-height: 1em;
        }
108

杨思琦's avatar
杨思琦 committed
109 110 111 112
        .esri-slider__label-input {
          display: inline-block;
        }
      }
113

杨思琦's avatar
杨思琦 committed
114 115 116 117
      .esri-slider-with-dropdown__box--drop-down-on,
      .esri-slider-with-dropdown__box--drop-down-off {
        width: min-content;
      }
118 119
    }

杨思琦's avatar
杨思琦 committed
120 121
    .esri-slider--ampm-on .esri-slider.esri-slider--horizontal {
      padding: 30px 8px 42px;
122

杨思琦's avatar
杨思琦 committed
123 124 125
      ~ .esri-daylight__play-pause-button {
        margin-bottom: 10px; // Align vertically with the slider
      }
126 127
    }

杨思琦's avatar
杨思琦 committed
128 129
    .esri-slider--shadow-on .esri-slider__thumb {
      box-shadow: 2px 2px 5px 0 rgb(148 148 148 / 63%);
130 131
    }

杨思琦's avatar
杨思琦 committed
132 133 134
    .esri-slider.esri-slider--horizontal .esri-widget__anchor.esri-slider-with-dropdown__anchor {
      color: $interactive-font-color;
      font-size: $font-size--tiny-time-slider;
135

杨思琦's avatar
杨思琦 committed
136 137 138
      &:hover {
        color: $interactive-font-color--hover;
      }
139 140
    }

杨思琦's avatar
杨思琦 committed
141 142
    calcite-label {
      --calcite-label-margin-bottom: 0;
143 144 145 146 147 148 149
    }
  }
}

@if $include_Daylight == true {
  @include daylight();
}