123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- // Calendars
- .calendar {
- border: $border-width solid $border-color;
- border-radius: $border-radius;
- display: block;
- min-width: 280px;
- .calendar-nav {
- align-items: center;
- background: $bg-color;
- border-top-left-radius: $border-radius;
- border-top-right-radius: $border-radius;
- display: flex;
- font-size: $font-size-lg;
- padding: $layout-spacing;
- }
- .calendar-header,
- .calendar-body {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- padding: $layout-spacing 0;
- .calendar-date {
- flex: 0 0 14.28%; // 7 calendar-items each row
- max-width: 14.28%;
- }
- }
- .calendar-header {
- background: $bg-color;
- border-bottom: $border-width solid $border-color;
- color: $gray-color;
- font-size: $font-size-sm;
- text-align: center;
- }
- .calendar-body {
- color: $gray-color-dark;
- }
- .calendar-date {
- border: 0;
- padding: $unit-1;
- .date-item {
- @include control-transition();
- appearance: none;
- background: transparent;
- border: $border-width solid transparent;
- border-radius: 50%;
- color: $gray-color-dark;
- cursor: pointer;
- font-size: $font-size-sm;
- height: $unit-7;
- line-height: $unit-5;
- outline: none;
- padding: $unit-h;
- position: relative;
- text-align: center;
- text-decoration: none;
- vertical-align: middle;
- white-space: nowrap;
- width: $unit-7;
- &.date-today {
- border-color: $secondary-color-dark;
- color: $primary-color;
- }
- &:focus {
- @include control-shadow();
- }
- &:focus,
- &:hover {
- background: $secondary-color-light;
- border-color: $secondary-color-dark;
- color: $primary-color;
- text-decoration: none;
- }
- &:active,
- &.active {
- background: $primary-color-dark;
- border-color: darken($primary-color-dark, 5%);
- color: $light-color;
- }
- // Calendar badge support
- &.badge {
- &::after {
- position: absolute;
- top: 3px;
- right: 3px;
- transform: translate(50%, -50%);
- }
- }
- }
- .date-item,
- .calendar-event {
- &:disabled,
- &.disabled {
- cursor: default;
- opacity: .25;
- pointer-events: none;
- }
- }
- &.prev-month,
- &.next-month {
- .date-item,
- .calendar-event {
- opacity: .25;
- }
- }
- }
- .calendar-range {
- position: relative;
- &::before {
- background: $secondary-color;
- content: "";
- height: $unit-7;
- left: 0;
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- &.range-start {
- &::before {
- left: 50%;
- }
- }
- &.range-end {
- &::before {
- right: 50%;
- }
- }
- &.range-start,
- &.range-end {
- .date-item {
- background: $primary-color-dark;
- border-color: darken($primary-color-dark, 5%);
- color: $light-color;
- }
- }
- .date-item {
- color: $primary-color;
- }
- }
- // Calendars size
- &.calendar-lg {
- .calendar-body {
- padding: 0;
- .calendar-date {
- border-bottom: $border-width solid $border-color;
- border-right: $border-width solid $border-color;
- display: flex;
- flex-direction: column;
- height: 5.5rem;
- padding: 0;
- &:nth-child(7n) {
- border-right: 0;
- }
- &:nth-last-child(-n+7) {
- border-bottom: 0;
- }
- }
- }
- .date-item {
- align-self: flex-end;
- height: $unit-7;
- margin-right: $layout-spacing-sm;
- margin-top: $layout-spacing-sm;
- }
- .calendar-range {
- &::before {
- top: 19px;
- }
- &.range-start {
- &::before {
- left: auto;
- width: 19px;
- }
- }
- &.range-end {
- &::before {
- right: 19px;
- }
- }
- }
- .calendar-events {
- flex-grow: 1;
- line-height: 1;
- overflow-y: auto;
- padding: $layout-spacing-sm;
- }
- .calendar-event {
- border-radius: $border-radius;
- font-size: $font-size-sm;
- display: block;
- margin: $unit-h auto;
- overflow: hidden;
- padding: 3px 4px;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
|