|
1 | 1 | /** |
2 | | - * CustomTime v1.0 (https://github.com/deviscoding/custom-time) with Icons from Open Iconic (https://useiconic.com/open) |
| 2 | + * CustomTime v1.0.2 (https://github.com/deviscoding/custom-time) with Icons from Open Iconic (https://useiconic.com/open) |
3 | 3 | * @author AMJones [am@jonesiscoding.com] |
4 | 4 | * @licence MIT (https://github.com/deviscoding/custom-time/blob/master/LICENSE) |
5 | 5 | */ |
|
11 | 11 | } |
12 | 12 |
|
13 | 13 | .custom-time-wrapper { |
14 | | - background: #fff url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D%228%22%20viewBox%3D%220%200%208%208%22%3E%3Cpath%20fill%3D%22%23495057%22%20d%3D%22M4%200c-2.2%200-4%201.8-4%204s1.8%204%204%204%204-1.8%204-4-1.8-4-4-4zm0%201c1.66%200%203%201.34%203%203s-1.34%203-3%203-3-1.34-3-3%201.34-3%203-3zm-.5%201v2.22l.16.13.5.5.34.38.72-.72-.38-.34-.34-.34v-1.81h-1z%22%20%2F%3E%3C%2Fsvg%3E") no-repeat left calc(0.375rem + 4px) center; |
| 14 | + background: #fff url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%208%208%22%3E%3Cpath%20fill%3D%22rgba%2873%2C%2080%2C%2087%2C%200.7%29%22%20d%3D%22M4%200c-2.2%200-4%201.8-4%204s1.8%204%204%204%204-1.8%204-4-1.8-4-4-4zm0%201c1.66%200%203%201.34%203%203s-1.34%203-3%203-3-1.34-3-3%201.34-3%203-3zm-.5%201v2.22l.16.13.5.5.34.38.72-.72-.38-.34-.34-.34v-1.81h-1z%22%20%2F%3E%3C%2Fsvg%3E") no-repeat left calc(0.375rem + 4px) center; |
15 | 15 | border: 1px solid #ced4da; |
16 | 16 | border-radius: 2px; |
17 | 17 | height: calc(2.25rem + 2px); |
|
28 | 28 | display: none; |
29 | 29 | } |
30 | 30 |
|
31 | | -.custom-time-wrapper .custom-h, .custom-time-wrapper .custom-i, .custom-time-wrapper .custom-s, .custom-time-wrapper .custom-a { |
| 31 | +.custom-time-wrapper select[class*="custom-time-"] { |
| 32 | + background-color: transparent; |
32 | 33 | -webkit-appearance: none; |
33 | 34 | -moz-appearance: none; |
34 | 35 | appearance: none; |
35 | | - background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D%228%22%20viewBox%3D%220%200%208%208%22%3E%3Cpath%20fill%3D%22rgba%2873%2C%2080%2C%2087%2C%200.5%29%22%20d%3D%22M0%200l4%204%204-4h-8z%22%20transform%3D%22translate%280%202%29%22%20%2F%3E%3C%2Fsvg%3E") no-repeat right 0.5rem center; |
36 | 36 | border: none !important; |
37 | 37 | border-radius: 0 !important; |
38 | 38 | height: 100%; |
39 | | - padding: 0 calc(1rem + 8px) 0 0.5rem; |
| 39 | + min-width: 2rem; |
| 40 | + text-align: center; |
| 41 | + padding: 0 3px 0 0; |
40 | 42 | } |
41 | 43 |
|
42 | | -.custom-time-wrapper .custom-h:focus, .custom-time-wrapper .custom-i:focus, .custom-time-wrapper .custom-s:focus, .custom-time-wrapper .custom-a:focus { |
| 44 | +.custom-time-wrapper select[class*="custom-time-"] > option { |
| 45 | + padding: 0; |
| 46 | +} |
| 47 | + |
| 48 | +.custom-time-wrapper select[class*="custom-time-"]:focus { |
43 | 49 | outline: none; |
| 50 | + background-color: rgba(128, 189, 255, 0.5) !important; |
44 | 51 | box-shadow: none; |
45 | 52 | border: none; |
46 | 53 | } |
47 | 54 |
|
| 55 | +.custom-time-wrapper select[class*="custom-time-"]:hover { |
| 56 | + background-color: rgba(128, 189, 255, 0.7); |
| 57 | +} |
| 58 | + |
| 59 | +.custom-time-wrapper select[class*="custom-time-"]::-ms-expand { |
| 60 | + opacity: 0; |
| 61 | +} |
| 62 | + |
| 63 | +.custom-time-wrapper select[class*="custom-time-"]:-moz-focusring { |
| 64 | + color: transparent; |
| 65 | + text-shadow: 0 0 0 #000; |
| 66 | +} |
| 67 | + |
| 68 | +.custom-time-wrapper select.custom-time-i, .custom-time-wrapper select.custom-time-s { |
| 69 | + background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D%228%22%20viewBox%3D%220%200%208%208%22%3E%3Cpath%20fill%3D%22rgba%2873%2C%2080%2C%2087%2C%200.7%29%22%20d%3D%22M3%2C7H5V5H3ZM3%2C3H5V1H3Z%22%2F%3E%3C%2Fsvg%3E") no-repeat left 2px center; |
| 70 | + padding: 0 0 0 4px; |
| 71 | + min-width: calc(2rem + 4px); |
| 72 | + margin-left: -2px; |
| 73 | +} |
| 74 | + |
| 75 | +.custom-time-wrapper select.custom-time-a { |
| 76 | + min-width: 2.25rem; |
| 77 | +} |
| 78 | + |
48 | 79 | @media handheld, screen and (pointer: coarse) { |
49 | 80 | .custom-time-wrapper:focus-within { |
50 | 81 | border: none; |
|
56 | 87 | display: inline-block; |
57 | 88 | padding: 0; |
58 | 89 | } |
59 | | - .custom-time-wrapper .custom-h, .custom-time-wrapper .custom-i, .custom-time-wrapper .custom-s, .custom-time-wrapper .custom-a { |
| 90 | + .custom-time-wrapper select[class*="custom-time-"] { |
60 | 91 | display: none; |
61 | 92 | } |
62 | 93 | } |
0 commit comments