-
Notifications
You must be signed in to change notification settings - Fork 10
/
datetime-local-polyfill.scss
125 lines (107 loc) · 2.53 KB
/
datetime-local-polyfill.scss
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/* !HTML5 DateTime-Local polyfill | Jonathan Stipe | https://github.com/jonstipe/datetime-local-polyfill */
@mixin transition($data...) {
-moz-transition: $data;
-webkit-transition: $data;
-o-transition: $data;
-ms-transition: $data;
transition: $data;
}
@mixin box-sizing($data) {
-moz-box-sizing: $data;
-webkit-box-sizing: $data;
box-sizing: $data;
}
@mixin border-radius($data...) {
-moz-border-radius: $data;
-webkit-border-radius: $data;
border-radius: $data;
}
button.datetime-local-datepicker-button:after {
display: inline-block;
content: "";
width: 0;
height: 0;
border: {
style: solid;
width: 0.4em 0.4em 0em 0.4em;
color: black transparent transparent transparent;
}
margin: 0em 0em 0.2em 0.7em;
vertical-align: middle;
}
.csstransitions {
div.datetime-local-calendar-dialog.datetime-local-closed {
@include transition(opacity 0.4s linear);
opacity: 0;
}
div.datetime-local-calendar-dialog.datetime-local-open {
@include transition(opacity 0.4s linear);
opacity: 1;
}
}
div.datetime-local-spin-btn-container {
display: inline-block;
position: relative;
vertical-align: bottom;
margin: 0;
padding: 0;
}
div.datetime-local-spin-btn {
@include box-sizing(border-box);
border: 2px outset #CCCCCC;
background-color: #CCCCCC;
width: 1.2em;
}
div.datetime-local-spin-btn-up {
@include border-radius(3px 3px 0px 0px);
border-bottom-width: 1px;
}
div.datetime-local-spin-btn-down {
@include border-radius(0px 0px 3px 3px);
border-top-width: 1px;
}
div.datetime-local-spin-btn-up:before,
div.datetime-local-spin-btn-down:before {
content: "";
width: 0;
height: 0;
border-style: solid;
position: absolute;
left: 50%;
margin: -0.15em 0 0 -0.3em;
padding: 0;
}
div.datetime-local-spin-btn-up:before {
border: {
width: 0 0.3em 0.3em 0.3em;
color: transparent transparent black transparent;
}
top: 25%;
}
div.datetime-local-spin-btn-down:before {
border: {
width: 0.3em 0.3em 0 0.3em;
color: black transparent transparent transparent;
}
top: 75%;
}
div.datetime-local-spin-btn:hover {
cursor: pointer;
}
div.datetime-local-spin-btn:active {
border: 2px inset #999999;
background-color: #999999;
}
div.datetime-local-spin-btn-up:active:before {
border-color: transparent transparent white transparent;
top: 26%;
left: 51%;
}
div.datetime-local-spin-btn-down:active:before {
border-color: white transparent transparent transparent;
top: 76%;
left: 51%;
}
div.datetime-local-calendar-dialog {
z-index: 100;
}