airbnb.styl 1.52 KB
Newer Older
Joe TS Dell's avatar
Joe TS Dell 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
80
81
82
83
84
85
86
87
$calendarBackground = #fff
$calendarBorderColor = #eee

$monthForeground = #3c3f40
$monthBackground = transparent

$weekdaysBackground = transparent
$weekdays_color = #757575

$dayForeground = #404848
$dayHoverBackground = #e9e9e9
$disabled_border_color = $dayHoverBackground

$disabled_day_color = alpha(black, 0.15)

$todayColor = #F64747
$today_fg_color = #fff

$selectedDayBackground =  #4f99ff
$selectedDayForeground = #fff

@require "../flatpickr"

.flatpickr-calendar
	width $daysWidth

.dayContainer
	padding 0
	border-right 0

span.flatpickr-day
	&, &.prevMonthDay, &.nextMonthDay
		border-radius 0 !important
		border 1px solid $dayHoverBackground
		max-width none
		border-right-color transparent

		&:nth-child(n+8)
			border-top-color transparent

		&:nth-child(7n-6)
			border-left 0

		&:nth-child(n+36)
			border-bottom 0

		&:nth-child(-n+7)
			margin-top 0

		&.today:not(.selected)
			border-color $dayHoverBackground
			border-right-color transparent
			border-top-color transparent
			border-bottom-color $todayColor

			&:hover
				border 1px solid $todayColor

		&.startRange, &.endRange
			border-color $selectedDayBackground


		&.today, &.selected
			z-index 2

.rangeMode .flatpickr-day
	margin-top -1px

.flatpickr-weekwrapper .flatpickr-weeks
	box-shadow none

.flatpickr-weekwrapper span.flatpickr-day
	border 0
	margin -1px 0 0 -1px


.hasWeeks .flatpickr-days
	border-right 0

@css {
	@media screen and (min-width:0\0) and (min-resolution: +72dpi) {
		span.flatpickr-day {
			display: block;
			flex: 1 0 auto;
		}
	}
}