forked from sociocracyforall/wp-sofatime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsofatime.css
162 lines (131 loc) · 3.11 KB
/
sofatime.css
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
span.date-time-end:before {
content: " – ";
}
span.range {
/*padding-right: 40px;*/
}
span.error {
padding-right: 0.5em;
}
span:not(:first-of-type).range:before {
content: "\a";
white-space: pre;
}
div.menu {
background-color: white;
border: 1px solid grey;
padding: 0.25em;
}
div.menu div.select-time-zone {
width: 300px;
}
span.choose-24h-display label {
margin-right: 0.5em;
}
span.select-time-zone label {
margin-right: 0.5em;
}
span.select-time-zone select {
width: 300px;
}
div.menu label {
display: inline-block;
width: 40%;
}
div.menu div.select-time-zone select {
width: 60%;
}
.sofatime {
display: flex;
flex-wrap: wrap;
/*justify-content: center;*/
/*align-items: center;*/
}
.sofatime div:nth-of-type(3) {
flex-basis: 100%;
}
.sofatime span {
display: inline-block; /* inline-block allows min-width */
font-weight: bold;
min-width: 16ch;
}
.sofatime .hidden { display: none; }
.sofatime .times {
display: flex;
white-space: nowrap;
}
.sofatime .times div {
flex-wrap: nowrap;
margin: 0.25em;
}
.sofatime-error {
background-color: #ffdddd;
}
.sofatime-error .sofatime-select-wrapper, .sofatime-error .sofatime-24h-wrapper {
/* display: none; */
}
.sofatimezone-select {
max-width: 300px;
}
/* The following rules have been disabled with the leading 'X' because I can't
* make them work with the new view style, so we are falling back to default
* checkbox formatting. To re-enable these rules, simply remove the leading
* 'X's, then you can work to get the fancy styling back in place! */
.choose-24h-display {
/*display: inline-flex;
background: #d9d9d9;
height: 20px;
border-radius: 20px;
font-weight: bold;
vertical-align: text-top;
align-items: center;*/
}
.choose-24h-display p {
padding: 2px 6px 0 2px;
}
/* The following is based on <https://codepen.io/mburnette/pen/LxNxNg>, with
* modifications to allow for the checkbox `input` element that are contained
* within their corresponding `label` element (rather than using the `for`
* attribute). */
.choose-24h-display input {
height: 0;
width: 0;
visibility: hidden;
}
.choose-24h-display label span.custom-checkbox-background {
cursor: pointer;
width: 30px;
height: 16px;
background: #324a70;
background: #b4b4c0;
display: inline-block;
border-radius: 20px;
position: relative;
}
.choose-24h-display label span {
position: relative;
}
.choose-24h-display label span.custom-checkbox-background:after {
content: '';
position: absolute;
top: 1px;
left: 1px;
width: 14px;
height: 14px;
background: #fff;
border-radius: 18px;
transition: 0.2s;
}
/* The `child-checked` class is applied by JavaScript when the child `input`
* element is checked, because there is (currently) no way in CSS to select an
* ancestor element based on the state of a descendent element. */
.choose-24h-display label.child-checked span.custom-checkbox-background {
background: #5c8bd6;
}
.choose-24h-display label.child-checked span.custom-checkbox-background:after {
left: calc(100% - 1px);
transform: translateX(-100%);
}
.choose-24h-display label:active:after {
width: 18px;
}