Debian Codegraph @

inst/www/shared/datepicker/scss/datepicker3.scss

raw
1 // Both BS3 and BS4 define a border radius mixin, but just in case
2 // we're trying to compile this without bootstrapSass
3 @mixin border-radius-shim($radius) {
4 @if mixin-exists("border-radius") {
5 @include border-radius($radius);
6 } @else {
7 border-radius: $radius;
8 }
9 }
10
11 .datepicker {
12 @include border-radius-shim($border-radius-base);
13 &-inline {
14 width: 220px;
15 }
16 direction: ltr;
17 &-rtl {
18 direction: rtl;
19 &.dropdown-menu { left: auto; }
20 table tr td span {
21 float: right;
22 }
23 }
24 &-dropdown {
25 top: 0;
26 left: 0;
27 padding: 4px;
28 &:before {
29 content: '';
30 display: inline-block;
31 border-left: 7px solid transparent;
32 border-right: 7px solid transparent;
33 border-bottom: 7px solid $dropdown-border;
34 border-top: 0;
35 border-bottom-color: rgba(0,0,0,.2);
36 position: absolute;
37 }
38 &:after {
39 content: '';
40 display: inline-block;
41 border-left: 6px solid transparent;
42 border-right: 6px solid transparent;
43 border-bottom: 6px solid $dropdown-bg;
44 border-top: 0;
45 position: absolute;
46 }
47 &.datepicker-orient-left:before { left: 6px; }
48 &.datepicker-orient-left:after { left: 7px; }
49 &.datepicker-orient-right:before { right: 6px; }
50 &.datepicker-orient-right:after { right: 7px; }
51 &.datepicker-orient-bottom:before { top: -7px; }
52 &.datepicker-orient-bottom:after { top: -6px; }
53 &.datepicker-orient-top:before {
54 bottom: -7px;
55 border-bottom: 0;
56 border-top: 7px solid $dropdown-border;
57 }
58 &.datepicker-orient-top:after {
59 bottom: -6px;
60 border-bottom: 0;
61 border-top: 6px solid $dropdown-bg;
62 }
63 }
64 table {
65 margin: 0;
66 -webkit-touch-callout: none;
67 -webkit-user-select: none;
68 -khtml-user-select: none;
69 -moz-user-select: none;
70 -ms-user-select: none;
71 user-select: none;
72 tr {
73 td, th {
74 text-align: center;
75 width: 30px;
76 height: 30px;
77 @include border-radius-shim(4px);
78 border: none;
79 }
80 }
81 }
82 // Inline display inside a table presents some problems with
83 // border and background colors.
84 .table-striped & table tr {
85 td, th {
86 background-color: transparent;
87 }
88 }
89 table tr td {
90 &.old,
91 &.new {
92 color: $btn-link-disabled-color;
93 }
94 &.day:hover,
95 &.focused {
96 color: color-contrast($gray-lighter);
97 background: $gray-lighter;
98 cursor: pointer;
99 }
100 &.disabled,
101 &.disabled:hover {
102 background: none;
103 color: $btn-link-disabled-color;
104 cursor: default;
105 }
106 &.highlighted {
107 $highlighted-bg: $state-info-bg;
108 @include button-variant($highlighted-bg, darken($highlighted-bg, 20%));
109 border-radius: 0;
110
111 &.focused {
112 background: darken($highlighted-bg, 10%);
113 }
114
115 &.disabled,
116 &.disabled:active {
117 background: $highlighted-bg;
118 color: $btn-link-disabled-color;
119 }
120 }
121 &.today {
122 $today-bg: lighten(orange, 30%);
123 @include button-variant($today-bg, darken($today-bg, 20%));
124
125 &.focused {
126 background: darken($today-bg, 10%);
127 }
128
129 &.disabled,
130 &.disabled:active {
131 background: $today-bg;
132 color: $btn-link-disabled-color;
133 }
134 }
135 &.range {
136 $range-bg: $gray-lighter;
137 @include button-variant($range-bg, darken($range-bg, 20%));
138 border-radius: 0;
139
140 &.focused {
141 background: darken($range-bg, 10%);
142 }
143
144 &.disabled,
145 &.disabled:active {
146 background: $range-bg;
147 color: $btn-link-disabled-color;
148 }
149 }
150 &.range.highlighted {
151 $range-highlighted-bg: mix($state-info-bg, $gray-lighter, 50%);
152 @include button-variant($range-highlighted-bg, darken($range-highlighted-bg, 20%));
153
154 &.focused {
155 background: darken($range-highlighted-bg, 10%);
156 }
157
158 &.disabled,
159 &.disabled:active {
160 background: $range-highlighted-bg;
161 color: $btn-link-disabled-color;
162 }
163 }
164 &.range.today {
165 $range-today-bg: mix(orange, $gray-lighter, 50%);
166 @include button-variant($range-today-bg, darken($range-today-bg, 20%));
167
168 &.disabled,
169 &.disabled:active {
170 background: $range-today-bg;
171 color: $btn-link-disabled-color;
172 }
173 }
174 &.selected,
175 &.selected.highlighted {
176 @include button-variant($gray-light, $gray);
177 text-shadow: 0 -1px 0 rgba(0,0,0,.25);
178 }
179 &.active,
180 &.active.highlighted {
181 @include button-variant($btn-primary-bg, $btn-primary-border);
182 text-shadow: 0 -1px 0 rgba(0,0,0,.25);
183 }
184 span {
185 display: block;
186 width: 23%;
187 height: 54px;
188 line-height: 54px;
189 float: left;
190 margin: 1%;
191 cursor: pointer;
192 @include border-radius-shim(4px);
193 &:hover,
194 &.focused {
195 color: color-contrast($gray-lighter);
196 background: $gray-lighter;
197 }
198 &.disabled,
199 &.disabled:hover {
200 background: none;
201 color: $btn-link-disabled-color;
202 cursor: default;
203 }
204 &.active,
205 &.active:hover,
206 &.active.disabled,
207 &.active.disabled:hover {
208 @include button-variant($btn-primary-bg, $btn-primary-border);
209 text-shadow: 0 -1px 0 rgba(0,0,0,.25);
210 }
211 &.old,
212 &.new {
213 color: $btn-link-disabled-color;
214 }
215 }
216 }
217
218 .datepicker-switch {
219 width: 145px;
220 }
221
222 .datepicker-switch,
223 .prev,
224 .next,
225 tfoot tr th {
226 cursor: pointer;
227 &:hover {
228 color: color-contrast($gray-lighter);
229 background: $gray-lighter;
230 }
231 }
232
233 .prev, .next {
234 &.disabled {
235 visibility: hidden;
236 }
237 }
238
239 // Basic styling for calendar-week cells
240 .cw {
241 font-size: 10px;
242 width: 12px;
243 padding: 0 2px 0 5px;
244 vertical-align: middle;
245 }
246 }
247 .input-group.date .input-group-addon {
248 cursor: pointer;
249 }
250 .input-daterange {
251 width: 100%;
252 input {
253 text-align: center;
254 }
255 input:first-child {
256 @include border-radius-shim(3px 0 0 3px);
257 }
258 input:last-child {
259 @include border-radius-shim(0 3px 3px 0);
260 }
261 .input-group-addon {
262 width: auto;
263 min-width: 16px;
264 padding: 4px 5px;
265 line-height: $line-height-base;
266 border-width: 1px 0;
267 margin-left: -5px;
268 margin-right: -5px;
269 }
270 }