PluginProbe
Watu Quiz / trunk
Watu Quiz vtrunk
3.4.8 trunk 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.5.3 3.4.6 3.4.7
watu / style.css

style.css in Watu Quiz trunk, at style.css

286 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Watu Quiz CSS
3 */
4
5 :root {
6 --watu-button-style-color: #707070;
7 --watu-correct-answer-color: green;
8 --watu-wrong-answer-color: red;
9 }
10
11 /* Normalize */
12 #watu_quiz *, #watu_quiz *::before, #watu_quiz *::after {
13 box-sizing: border-box;
14 }
15
16 .watu-question, #action-button {
17 display:none;
18 }
19
20 form.quiz-form {
21 text-align:left;
22 }
23
24 .single-page-quiz .watu-question, .single-page-quiz #action-button {
25 display:block;
26 }
27
28 .watu-question {
29 clear: both;
30 width: 100%;
31 }
32
33 .single-page-quiz #next-question {
34 display:none;
35 }
36 .question-content {
37 margin-top:20px;
38 }
39
40 /* Answers */
41 li.answer {
42 clear: both;
43 /*list-style-position: inside;*/
44 }
45 li.answer span {
46 /*width: calc(100% - 2em);*/
47 }
48 li.answer::marker {
49 margin: -0.25em;
50 }
51 li.user-answer::marker {
52 color: var(--watu-wrong-answer-color);
53 margin: -0.25em;
54 }
55 li.correct-answer::marker {
56 color: var(--watu-correct-answer-color);
57 margin: -0.25em;
58 }
59
60 .correct-answer>span, .user-answer>span {
61 /*padding-right:20px; 03.04.2021 */
62 }
63 .user-answer>span {
64 /*font-weight:bold;
65 background:url(wrong.png) no-repeat right top;*/
66 }
67
68 .user-answer span.answer, .correct-answer span.answer {
69 vertical-align: top;
70 padding-right: 1.5em;
71 display: inline-block; /* bullets problem? */
72 min-height: 100%;
73 }
74 .user-answer span.answer {
75 font-weight:bold;
76 background:url(wrong.png) no-repeat right 0.15em;
77 }
78 .correct-answer span.answer {
79 background:url(correct.png) no-repeat right 0.15em;
80 }
81
82 .user-answer-survey>span {
83 font-weight:bold;
84 }
85
86 li.answer span {
87 vertical-align: top;
88 display: inline-block; /* bullets problem? */
89 padding-right: 1.5em;
90 }
91
92 li.answer span img {
93 clear: none;
94 margin: 10px 0 10px 0;
95 display: unset;
96 }
97
98 .user-answer span.answer img {
99 border: 2px solid var(--watu-wrong-answer-color);
100 }
101 .user-answer.correct-answer span.answer img {
102 border: 2px solid var(--watu-correct-answer-color);
103 }
104
105 .watu-sidebox {
106 border:1px solid black;
107 padding:10px;
108 margin-bottom: 20px;
109 }
110
111 #watu-sidebar {
112 float:left;
113 min-width:200px;
114 max-width: 320px;
115 }
116
117 #watu-related, #watu-ad {
118 background-color: #BBEEDD;
119 }
120
121 .quiz-form label {
122 display: inline-block !important;
123 max-width: calc(100% - 3em);
124 vertical-align: top;
125 font-size: unset; /* to prevent changing from theme */
126 }
127
128 .watu-basic-chart td, .watu-basic-chart-points td, .watu-basic-chart-percent td {
129 padding: 6px;
130 border: none;
131 }
132
133 table.watu-basic-chart {
134 border: none;
135 }
136
137 .quiz-form input[type='checkbox'] {
138 display: inline !important;
139 }
140
141 .quiz-form input[type='radio'] {
142 display: inline !important;
143 }
144
145 .show-question {
146 border-bottom: 1px dashed #DDD;
147 margin-bottom: 7px;
148 }
149
150 .show-question-content {
151 font-size:110%;
152 }
153
154 .watu-admin label {
155 min-width: 150px;
156 display:block;
157 float:left;
158 }
159
160 .watu-padded {
161 padding: 10px;
162 }
163
164 .watu-twitter-share-button {
165 margin: 0px !important;
166 }
167
168 .watu-textarea {
169 -webkit-box-sizing: border-box;
170 -moz-box-sizing: border-box;
171 box-sizing: border-box;
172 max-width: 100%;
173 }
174
175 /* The following is override for themes that set radios and checkboxes on their own line */
176 .quiz-form input[type="checkbox"],
177 .quiz-form input[type="radio"] {
178 display: inline-block !important;
179 margin-left: 0.25em;
180 margin-right: 0.5em; /* 04.05.2021 */
181 /*vertical-align: -0.15em;*/ /* 04.05.2021 */
182 }
183 form.quiz-form span {
184 display: inline;
185 }
186 form.quiz-form input {
187 display: inline;
188 }
189 input.watu-beehive {
190 display:none !important;
191 }
192
193 /* Question grid */
194 .watu-question-choice {
195 width: 100%;
196 display: block;
197 margin: 0.438em 0; /* 7px */
198 }
199
200 /* Fake (pseudo) element, that enables vertical-align */
201 .watu-question-choice:before {
202 content: "";
203 display: inline-block;
204 vertical-align: middle;
205 height: 100%;
206 }
207
208 @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
209 /* IE10+ CSS styles go here - for IE bug */
210 .watu-question-choice input[type=radio],
211 .watu-question-choice input[type=checkbox] {margin-top: 0.25em; width: 1rem;}
212 .quiz-form label {padding-top: 0; }
213 }
214
215 .watu-questions-wrap {
216 display: block;
217 }
218
219 /*.watu-question-gallery .watu-question-choice {
220 width: var(--watu-image-width);
221 }*/
222
223 .watu-2-columns .watu-question-choice,
224 .watu-3-columns .watu-question-choice,
225 .watu-4-columns .watu-question-choice,
226 .watu-5-columns .watu-question-choice {
227 width: 100%;
228 }
229
230 /* Questions button style */
231 /* thanks to http://viralpatel.net/blogs/css-radio-button-checkbox-background/ */
232 .watu-button-style .watu-question-choice input[type=radio],
233 .watu-button-style .watu-question-choice input[type=checkbox] {
234 display:none !important;
235 }
236
237 .watu-button-style .watu-question-choice input[type=radio] + label,
238 .watu-button-style .watu-question-choice input[type=checkbox] + label {
239 margin: 0.25em 0 0 0;
240 padding: 0.25em 0.75em;
241 font-size: 1em;
242 text-align: center;
243 vertical-align: middle;
244 cursor: pointer;
245 border: 1px solid var(--watu-button-style-color);
246 background: #fff;
247 color: var(--watu-button-style-color);
248 }
249
250 .watu-button-style .watu-question-choice.watupro-ansnum input[type=radio] + label,
251 .watu-button-style .watu-question-choice.watupro-ansnum input[type=checkbox] + label {
252 max-width: calc(100% - 3em);
253 }
254
255 .watu-button-style .watu-question-choice input[type=radio]:checked + label,
256 .watu-button-style .watu-question-choice input[type=checkbox]:checked + label {
257 background-image: none;
258 outline: 0;
259 background: var(--watu-button-style-color);
260 color: #fff;
261 }
262
263 @media screen and (min-width: 768px) {
264 .watu-questions-wrap {
265 display: flex;
266 flex-wrap: wrap;
267 align-items: flex-start;
268 }
269
270 .watu-2-columns .watu-question-choice, .watu-2-columns li {
271 width: 50%;
272 padding: 0 2.5em 0 0;
273 }
274 .watu-3-columns .watu-question-choice, .watu-3-columns li {
275 width: 33%;
276 padding: 0 2.5em 0 0;
277 }
278 .watu-4-columns .watu-question-choice, .watu-4-columns li {
279 width: 25%;
280 padding: 0 2.5em 0 0;
281 }
282 .watu-5-columns .watu-question-choice, .watu-5-columns li {
283 width: 20%;
284 padding: 0 2.5em 0 0;
285 }
286 }