forked from franciscop/picnic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.html
687 lines (618 loc) · 19 KB
/
tests.html
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
<!DOCTYPE html><html lang="en"><head><title>Picnic CSS Testing</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="keywords" content="css, library, picnic, picnicss, light"><meta name="description" content="A lightweight CSS library"><link rel="stylesheet" href="web/style/style.min.css"><link rel="icon" href="web/img/basket.png" type="image/png"><link rel="stylesheet" media="bogus"></head><body><nav><a href="/" class="brand"><span>Picnic CSS</span></a><input id="bmenu" type="checkbox" class="show"><label for="bmenu" class="burger toggle pseudo button">menu</label><div class="menu"><a href="/tests" class="pseudo button icon-help-circled">Test</a><a href="https://github.com/franciscop/picnic" target="_blank" class="pseudo button icon-g">GitHub</a><a href="/documentation" class="button icon-file-code">Documentation</a></div></nav><main class="intro test"><h1>Testing Picnic CSS</h1><p>A small testing page to see how elements behave across devices</p><!-- Testing the module -->
<h2 id="button">Button types and colors</h2>
<div>
<button>Button</button>
<button class="success">Button</button>
<button class="warning">Button</button>
<button class="error" >Button</button>
<button class="pseudo">Button</button>
<button disabled>Button</button>
</div>
<div>
<a class="button">Link</a>
<a class="button success">Link</a>
<a class="button warning">Link</a>
<a class="button error">Link</a>
<a class="button pseudo">Link</a>
<a class="button" disabled>Link</a>
</div>
<div>
<input type="submit" value = "Submit" />
<input type="submit" class="success" value="Submit" />
<input type="submit" class="warning" value="Submit" />
<input type="submit" class="error" value="Submit" />
<input type="submit" class="pseudo" value="Submit" />
<input disabled type="submit" value="Submit" />
</div>
<div>
<label>
<input type="checkbox" />
<span class="toggle button">Toggle</span>
</label>
<label>
<input type="checkbox" />
<span class="toggle button success">Toggle</span>
</label>
<label>
<input type="checkbox" />
<span class="toggle button warning">Toggle</span>
</label>
<label>
<input type="checkbox" />
<span class="toggle button error">Toggle</span>
</label>
<label>
<input type="checkbox" />
<span class="toggle button pseudo">Toggle</span>
</label>
<label>
<input disabled type="checkbox" />
<span disabled class="toggle button">Toggle</span>
</label>
</div>
<h2 id="card">Card</h2>
<p>
<div class="flex three">
<div>
<article class="card">
<img src="web/img/forest.jpg">
<section>This is a nice forest. What do you want to do with it?</section>
<footer>
<button>Enjoy</button>
<button class="dangerous">Go away</button>
</footer>
</article>
</div>
<div>
<article class="card">
<header>
<h3>A more elaborated card</h3>
</header>
<section>It has some text</section>
<footer>
And even a footer!
</footer>
</article>
<div>
<input type="checkbox" id="cardtoggle">
<article class="card">
<p>Paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore...</p>
<label for="cardtoggle" class="close">×</a>
</article>
</div>
</div>
<div>
<input id="cardtoggle2" type="checkbox" name="name">
<article class="card">
<header>
<h1>Header 1</h1>
<label for="cardtoggle2" class="close">×</a>
</header>
</article>
<input id="cardtoggle3" type="checkbox" name="name2">
<article class="card">
<header>
<h2>Header 2</h2>
<label for="cardtoggle3" class="close">×</label>
</header>
</article>
<article class="card">
<header>
<h3>Header 3</h3>
<a class="close">×</a>
</header>
</article>
<article class="card">
<header>
<h4>Header 4</h4>
<a class="close">×</a>
</header>
</article>
</div>
</div>
<div class="row">
<div class="card">
<p>This is a one line card</p>
<a class="close">×</a>
</div>
</div>
</p>
<h2 id="checkbox">Checkbox</h2>
<label>
<input type="checkbox">
<span class="checkable">Check me out (;</span>
</label>
<br>
<input id="checktest" type="checkbox" checked>
<label for="checktest" class="checkable">Uncheck me</label>
<h2 id="dropimage">Dropimage</h2>
<div class="flex three">
<div>
<label class="dropimage" style="background-image: url('web/img/forest.jpg');">
<input name="filea" title="Drop image or click me" type="file">
</label>
</div>
<div>
<label class="dropimage">
<input name="fileb" title="Drop image or click me" type="file">
</label>
</div>
<div>
<label class="dropimage">
<input name="filec" title="Drop image or click me" type="file">
</label>
</div>
</div>
<script>
window.onload = function(){
[].forEach.call(document.querySelectorAll('.dropimage'), function(img){
img.onchange = function(e){
var inputfile = this, reader = new FileReader();
reader.onloadend = function(){
inputfile.style['background-image'] = 'url('+reader.result+')';
}
reader.readAsDataURL(e.target.files[0]);
}
});
};
</script>
<h2 id="grid">Grid</h2>
<div class="flex two four-500 six-800 demo">
<div><span>1</span></div>
<div><span>2</span></div>
<div class="full half-500 third-800"><span>3</span></div>
<div><span>4</span></div>
<div><span>5</span></div>
<div><span>6</span></div>
<div><span>7</span></div>
<div><span>8</span></div>
<div><span>9</span></div>
<div class="off-half off-fourth-500 off-sixth-800"><span>10</span></div>
</div>
<h2 id="input">Input</h2>
<div class="flex two">
<div>
<input placeholder="Full name" />
</div><div>
<input type="number" placeholder="Number" />
</div>
</div>
<div class="flex two">
<div>
<input type="email" placeholder="Email"/>
</div><div>
<input type="password" placeholder="Password"/>
</div>
</div>
<div class="flex two">
<div>
<input type="file"/>
</div><div>
<input type="color"/>
</div>
</div>
<div class="flex one">
<div>
<textarea placeholder="Full description"></textarea>
</div>
</div>
<h2 id="label">Label</h2>
<p>
<h1>h1 is important
<span class="label">Normal</span>
</h1>
<h2>h2 is important too
<span class="label success">Success</span>
</h2>
<h3>Is h3 important?
<span class="label warning">Warning</span>
</h3>
<h4>h4 is not so important
<span class="label error">Error</span>
</h4>
<p>p is normal text
<span class="label">Normal</span>
</p>
</p>
<h2 id="modal">Modal</h2>
<p>
<label for="modal_1" class="button">
Show modal
</label>
</p>
<div class="modal">
<input id="modal_1" type="checkbox" />
<label for="modal_1" class="overlay"></label>
<article>
<header>
<h3>Great offer</h3>
<label for="modal_1" class="close">×</label>
</header>
<section class="content">
We have a special offer for you. I am sure you will love it! However this does look spammy...
</section>
<footer>
<a class="button" href="#">See offer</a>
<label for="modal_1" class="button dangerous">
Cancel
</label>
</footer>
</article>
</div>
<h2 id="nav">Nav</h2>
<p>
<nav style="position: relative; z-index: 9">
<a href="#" class="brand">
<img class="logo" src="/web/img/basket.png" />
<span>Picnic CSS</span>
</a>
<!-- responsive-->
<input id="bmenub" type="checkbox" class="show">
<label for="bmenub" class="burger pseudo button toggle">menu</label>
<div class="menu">
<a href="#" class="pseudo button icon-picture">Demo</a>
<a href="#" class="button icon-puzzle">Plugins</a>
</div>
</nav>
</p>
<h2 id="radio">Radio button</h2>
<p>
<label>
<input type='radio' name="radiodemo">
<span class="checkable">Select me</span>
</label>
</p>
<p>
<label>
<input checked type='radio' name="radiodemo">
<span class="checkable">Or me</span>
</label>
</p>
<h2 id="select">Select</h2>
<div class="flex two">
<p>
<select>
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
</p>
<p>
<select multiple>
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
</p>
</div>
<!-- Testing the module -->
<h2 id="stack">Stack</h2>
<h3>Buttons stack</h3>
<div class="flex four">
<div>
<span class="stack button icon-puzzle">Plugins</span>
<span class="stack button icon-picture">Demo</span>
<span class="stack button icon-help-circled">Test</span>
</div>
<div>
<label class="stack">
<input type="radio" name="stack" checked/>
<span class="button toggle icon-puzzle">Plugins</span>
</label>
<label class="stack">
<input type="radio" name="stack" />
<span class="button toggle icon-picture">Demo</span>
</label>
<label class="stack">
<input type="radio" name="stack" />
<span class="button toggle icon-help-circled">Test</span>
</label>
</div>
<div>
<label class="stack">
<input type="checkbox" checked/>
<span class="button toggle icon-puzzle">Plugins</span>
</label>
<label class="stack">
<input type="checkbox" checked/>
<span class="button toggle icon-picture">Demo</span>
</label>
<label class="stack">
<input type="checkbox"/>
<span class="button toggle icon-help-circled">Test</span>
</label>
</div>
<div>
<span class="stack pseudo button icon-puzzle">Plugins</span>
<span class="stack pseudo button icon-picture">Demo</span>
<span class="stack pseudo button icon-help-circled">Test</span>
</div>
</div>
<h3>Image stack</h3>
<div class="flex four">
<div>
<img class="stack" src="web/img/forest.jpg">
<a class="stack button">Forest</a>
</div>
<div>
<img class="stack" src="web/img/balloon.jpg">
<a class="stack button">Balloon</a>
</div>
<div>
<img class="stack" src="web/img/lake.jpg">
<a class="stack button">Lake</a>
</div>
<div>
<img class="stack" src="web/img/halong.jpg">
<a class="stack button">Halong bay</a>
</div>
</div>
<h3>Form stack</h3>
<div class="flex four">
<div>
<input class="stack" placeholder="Name" />
<input class="stack" type="email" placeholder="Email" />
<input class="stack" type="password" placeholder="Password" />
</div>
<div>
<select class="stack">
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
<select class="stack">
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
<select class="stack">
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
</div>
<div>
<textarea class="stack" placeholder="Textarea"></textarea>
<textarea class="stack" placeholder="Textarea"></textarea>
<textarea class="stack" placeholder="Textarea"></textarea>
</div>
<div>
<label class="dropimage stack">
<input name="filea" title="Drop image or click me" type="file">
</label>
<label class="dropimage stack">
<input name="filea" title="Drop image or click me" type="file">
</label>
<label class="dropimage stack">
<input name="filea" title="Drop image or click me" type="file">
</label>
</div>
</div>
<h2 id="table">Table</h2>
<table class="primary">
<thead>
<tr>
<th>Name</th>
<th>City</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>Francisco</td>
<td>Valencia, Spain</td>
<td>23</td>
</tr>
<tr>
<td>Eve</td>
<td>San Francisco, USA</td>
<td>22</td>
</tr>
<tr>
<td>Martin</td>
<td>New York, USA</td>
<td>45</td>
</tr>
<tr>
<td>Sarah</td>
<td>London, UK</td>
<td>25</td>
</tr>
</tbody>
</table>
<h2>Tab</h2>
<div class="flex two">
<div>
<div class="tabs three">
<input id='tab-1' type='radio' name='tabgroupB' checked />
<label class="pseudo button toggle" for="tab-1">Forest</label>
<input id='tab-2' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-2">Lake</label>
<input id='tab-3' type='radio' name='tabgroupB'>
<label class="pseudo button toggle" for="tab-3">Balloon</label>
<div class="row">
<div>
<img src="web/img/forest.jpg">
</div>
<div>
<img src="web/img/lake.jpg">
</div>
<div>
<img src="web/img/balloon.jpg">
</div>
</div>
</div>
</div>
<div>
<div class="tabs three" style="text-align: center;">
<input id='tabC-1' type='radio' name='tabgroupC' checked />
<label class="pseudo button toggle" for="tabC-1">1</label>
/
<input id='tabC-2' type='radio' name='tabgroupC'>
<label class="pseudo button toggle" for="tabC-2">2</label>
/
<input id='tabC-3' type='radio' name='tabgroupC'>
<label class="pseudo button toggle" for="tabC-3">3</label>
<div class="row">
<div>
<div class="card" style="margin: 0 20px;">
<header>
<h3>Super important notice!</h3>
</header>
<p>Thank you for registering! By doing so you agree to the <a href="#">Terms and conditions</a></p>
<footer>
<label class="button" for="tabC-2">Agree</label>
</footer>
</div>
</div>
<div>
<div class="card" style="margin: 0 20px;">
<header>
<h3>Your basic data</h3>
</header>
<section>
<input type="text" placeholder="Full Name">
</section>
<section>
<div class="select">
<select>
<option>Where did you find us?</option>
<option>Facebook</option>
<option>Twitter</option>
<option>Linkedin</option>
</select>
</div>
</section>
<footer>
<label class="button" for="tabC-3">Next</label>
<label class="button dangerous" for="tabC-1">Back</label>
</footer>
</div>
</div>
<div>
<div class="card" style="margin: 0 20px;">
<header>
<h3>Create account</h3>
</header>
<section>
<input type="email" placeholder="Email">
</section>
<section>
<input type="password" placeholder="Password">
</section>
<footer>
<button class="success">Finish!</button>
<label class="button dangerous" for="tabC-2">Back</label>
</footer>
</div>
</div>
</div>
</div>
</div>
<div>
<div class="tabs two">
<input id='tabA-1' type='radio' name='tabgroupA' checked />
<label class="button toggle" for="tabA-1">Tab 1</label>
<input id='tabA-2' type='radio' name='tabgroupA'>
<label class="button toggle" for="tabA-2">Tab 2</label>
<div class="row">
<div class='tab'>
<div>
<h2>This is the first tab</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
<div class="tab">
<div>
<h2>This is the second tab</h2>
<p>
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</div>
</div>
</div>
</div>
<div>
<div class="tabs four">
<input id='tabD-1' type='radio' name='tabgroupD' checked />
<label class="pseudo button toggle" for="tabD-1">•</label>
<input id='tabD-2' type='radio' name='tabgroupD'>
<label class="pseudo button toggle" for="tabD-2">•</label>
<input id='tabD-3' type='radio' name='tabgroupD'>
<label class="pseudo button toggle" for="tabD-3">•</label>
<input id='tabD-4' type='radio' name='tabgroupD'>
<label class="pseudo button toggle" for="tabD-4">•</label>
<div class="row">
<div class='tab'>
<div>
<h2>This is the first tab</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
<div class="tab">
<div>
<h2>This is the second tab</h2>
<p>
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</div>
<div class='tab'>
<div>
<h2>This is the third tab</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
<div class="tab">
<div>
<h2>This is the fourth tab</h2>
<p>
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<h2 id="tooltip">Tooltip</h2>
<p>
<button data-tooltip="This is a great tooltip" class="tooltip-left">
Left
</button>
<button data-tooltip="This is a great tooltip">
Bottom (default)
</button>
<button data-tooltip="This is a great tooltip" class="tooltip-top">
Top
</button>
<button data-tooltip="This is a great tooltip" class="tooltip-right">
Right
</button>
</p>
<br><br><br>
</main><script>window.onload = function(){
// Dropimage handler
[].forEach.call(document.querySelectorAll('.dropimage'), function(img){
img.onchange = function(e){
var inputfile = this, reader = new FileReader();
reader.onloadend = function(){
inputfile.style['background-image'] = 'url('+reader.result+')';
}
reader.readAsDataURL(e.target.files[0]);
}
});
};
</script><script src="/web/tracking.js" defer async></script></body></html>