-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
812 lines (626 loc) · 31.3 KB
/
index.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
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Bonkr</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Stylesheets -->
<link rel="stylesheet" href="./src/bonkr.css">
<!-- <link rel="stylesheet" href="./src/bonkr-btns.css"> -->
<style>
/* This is just to breakup the layout on this page */
@media (min-width: 768px) {
section { padding: 4rem 2.35rem; }
}
</style>
</head>
<body>
<header class="pd-a-4" style="">
<section class="w-mx-1100 pd-t-0 pd-b-0">
<div class="d-flx flx-wr-w flx-spc-1 flx-children-spc-1">
<a class="pos-abs" href="https://nicfontaine.com" title="created by nic fontaine" target="_blank">nicfontaine.com</a>
<span class="flx-child-1"></span>
<a class="btn" href="https://github.com/ngpfontaine/bonkr" title="the code on github" target="_blank">The Code ↗</a>
<a class="btn" href="https://jsfiddle.net/ngpfontaine/jp0z0ago/" target="_blank">Try on JSFiddle ↗</a>
</div>
</section>
</header>
<main>
<section>
<a class="d-table mg-0-auto" href="./img/bonkr-logo.png" target="_blank"><img class="mg-0-auto mg-b-5 w-mx-250" src="./img/bonkr-logo.png" alt="bonkr logo. stupid looking face thing"></a>
<h1 class="text-center mg-b-0">BONKR</h1>
<p class="text-center">
<strong>B</strong>oilerplate - <strong>O</strong>pinionated <em>(kinda)</em>, <strong>N</strong>a<strong>K</strong>ed, & <strong>R</strong>esponsive
</p>
<blockquote class="mg-t-8">
<p>
Bonkr is a normalized CSS boilerplate with a focus on <strong>style-agnostic</strong> usability, a simple <strong>layout system</strong>, and <strong>responsive flexibility</strong>. It's created as a starter-template with default component proportions & weight and some basic styling that won't conflict with yours, + some nice (and independant) features like <a href="#dialogs">dialogs</a> and a <a href="#loader">loader</a>.
</p>
<p>
You won't find any <strong>colours</strong>, <strong>embedded fonts</strong>, or <strong>navigation</strong> here — just a beautiful blank-slate for your content.
</p>
</blockquote>
</section>
<!--*************** Getting Started *******************-->
<section>
<h3 id="getting-started">Getting Started <a href="#getting-started" class="linker" title="anchor to getting started">#</a></h3>
<p>
<b>1.</b> Get The Code
</p>
<p>
<div class="d-flx flx-w flx-spc-2 flx-children-spc-2 flx-children-s-0">
<a href="https://github.com/ngpfontaine/bonkr" class="btn" target="_blank" title="github download">Download on Github</a><a href="https://jsfiddle.net/ngpfontaine/jp0z0ago/" class="btn" target="_blank" title="test on jsfiddle">Test on JSFiddle</a>
</div>
</p>
<pre><code>bonkr/
<span class="tag">├──</span> index.html
<span class="tag">├──</span> readme.md
<span class="tag">└──</span> src/
<span class="tag">├──</span> bonkr.css
<span class="tag">├──</span> bonkr-dialog.js
<span class="tag">├──</span> bonkr-dropdown-buttons.js
<span class="tag">└──</span> bonkr-loader.js
</code></pre>
<p class="pd-t-4">
<b>2.</b> Add files to your project<br>
</p>
<pre><code class="allselect"><span class="tag"><html>
<head>
<link rel="stylesheet" href="./</span><your-path><span class="tag">/bonkr.css">
</head>
<body></span>
<em>// Content</em>
<span class="tag"><script src="./</span><your-path><span class="tag">/bonkr-dialog.js"></script>
<script src="./</span><your-path><span class="tag">/bonkr-loader.js"></script>
</body>
</html></span>
</code></pre>
<p class="pd-t-4">
<b>3.</b> Code away — <em>and/or</em> check out the documentation below<br>
</p>
</section>
<!--*************** Text *******************-->
<section>
<h3 id="typography">Typography <a href="#typography" class="linker" title="anchor to paragraph">#</a></h3>
<p>
Font-sizing is <code>rem</code> based, relative to <code>html { font-size: 17px; line-height: 1.6 }</code>. No <code>font-family</code> is chosen, other than <code>sans-serif</code>, for simplicity — just copy the <em>Open Sans, Proxima Nova, & Roboto</em> link tags from your other projects...
</p>
<pre><code><span class="tag"><p></span>
Font-sizing is <span class="tag"><code></span>rem<span class="tag"></code></span> based...
<span class="tag"></p></span>
</code></pre>
<div class="pd-t-8"></div>
<p>
<a href="">Anchor</a> <code><a></code><br>
<u>Underline</u> <code><u></code><br>
<em>Emphasis</em> <code><em></code><br>
<strong>Strong</strong> <code><strong></code><br>
<b>Bold</b> <code><b></code><br>
<small>Small</small> <code><small></code><br>
Superscript<sup>TM</sup> <code><sup></code><br>
<cite>Citation</cite> <code><cite></code><br>
<s>Strikethrough</s> <code><s></code><br>
</p>
</section>
<section>
<h3 id="headings">Headings <a href="#headings" class="linker" title="anchor to headings">#</a></h3>
<blockquote>
<p>
<em><strong>Note</strong> — Each section heading on this page (like "Headings" immediately above) is an <code><h3></code></em>
</p>
</blockquote>
<div class="pd-t-8"></div>
<h1>Serenity Now!</h1>
<h2>I Want To Believe</h2>
<h3>Ez Mid</h3>
<h4>You, Shall Not Pass..</h4>
<h5>Fuck Trump</h5>
<h6>Your Bootstrap Site Sucks</h6>
<div class="pd-t-3"></div>
<pre><code><span class="tag"><h1></span> 3.4rem
<span class="tag"><h2></span> 2.8rem
<span class="tag"><h3></span> 2.3rem
<span class="tag"><h4></span> 1.7rem
<span class="tag"><h5></span> 1.3rem
<span class="tag"><h6></span> 1.1rem
</code></pre>
</section>
<section>
<h3 id="hr">Hr <a href="#hr" class="linker" title="anchor to horizontal">#</a></h3>
<hr>
</section>
<section>
<h3 id="tooltip">Tooltip <a href="#tooltip" class="linker" title="anchor to horizontal">#</a></h3>
<p>
<span class="ttip tr">Hover for tooltip!<span class="ttip-text">Tooltip</span></span>
</p>
<pre><code class="allselect"><span class="tag"><span class="ttip tr"></span>Hover for tooltip!<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
</code></pre>
<p>
<div class="d-flx flx-children-1 flx-children-spc-1 flx-spc-1 just-bt">
<div>
<span class="ttip t mg-b-3">Hover for <b>Top</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip r mg-b-3">Hover for <b>Right</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip b mg-b-3">Hover for <b>Bottom</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip l mg-b-3">Hover for <b>Left</b><span class="ttip-text">Tooltip</span></span><br>
</div>
<div>
<span class="ttip tr mg-b-3">Hover for <b>Top-Right</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip br mg-b-3">Hover for <b>Bottom-Right</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip bl mg-b-3">Hover for <b>Bottom-Left</b><span class="ttip-text">Tooltip</span></span><br>
<span class="ttip tl mg-b-3">Hover for <b>Top-Left</b><span class="ttip-text">Tooltip</span></span><br>
</div>
</div>
</p>
<pre><code class="allselect"><span class="tag"><span class="ttip t"></span>Top<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip r"></span>Right<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip b"></span>Bottom<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip l"></span>Left<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip tr"></span>Top-Right<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip br"></span>Bottom-Right<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip bl"></span>Bottom-Left<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
<span class="tag"><span class="ttip tl"></span>Top-Left<span class="tag"><span class="ttip-text"></span>Tooltip<span class="tag"></span></span>
</code></pre>
</section>
<section>
<h3 id="lists">Lists <a href="#lists" class="linker" title="anchor to lists">#</a></h3>
<ul>
<li>waffle</li>
<li>bildungsroman</li>
<li>forkroot</li>
<ul>
<li>pinecone</li>
</ul>
</ul>
<ol>
<li>pantaloons</li>
<li>numenor</li>
<li>pickleback</li>
<ul>
<li>hopscotch</li>
</ul>
</ol>
</section>
<section>
<h3 id="blockquote">Blockquote <a href="#blockquote" class="linker" title="anchor to blockquote">#</a></h3>
<blockquote class="quote">
<p>
I am a <strong>blockquote</strong>, and adding <code>.quote</code> will display this nifty quote on the right.
</p>
</blockquote>
<pre><code class="allselect"><span class="tag"><blockquote class="quote"></span>
<span class="tag"><p></span>
I am a <span class="tag"><strong></span>blockquote<span class="tag"></strong></span>, and adding <span class="tag"><code></span>.quote<span class="tag"></code></span> will display this nifty quote on the right.
<span class="tag"></p></span>
<span class="tag"></blockquote></span>
</code></pre>
</section>
<!--*************** TABLES *******************-->
<section>
<h3 id="tables">Tables <a href="#tables" class="linker" title="anchor to tables">#</a></h3>
<table class="mg-b-8">
<thead>
<tr>
<th>Class</th>
<th>Subraces</th>
<th>Ability Bonus</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dwarf</td>
<td>Hill, Mountain</td>
<td>+2 Constitution</td>
</tr>
<tr>
<td>Halfling</td>
<td>Lightfoot, Stout</td>
<td>+2 Dexterity</td>
</tr>
<tr>
<td>Elf</td>
<td>High, Wood, Drow</td>
<td>+2 Dexterity</td>
</tr>
</tbody>
</table>
<pre><code class="allselect"><span class="tag"><table>
<thead>
<tr>
<th></span>Class<span class="tag"></th>
<th></span>Subrace<span class="tag"></th>
<th></span>Ability Bonus<span class="tag"></th>
</tr>
</thead>
<tbody>
<tr>
<td></span>Dwarf<span class="tag"></td>
<td></span>Hill, Mountain<span class="tag"></td>
<td></span>+2 Constitution<span class="tag"></td>
</tr>
<tr>
<td></span>Halfling<span class="tag"></td>
<td></span>Lightfoot, Stout<span class="tag"></td>
<td></span>+2 Dexterity<span class="tag"></td>
</tr>
<tr>
<td></span>Elf<span class="tag"></td>
<td></span>High, Wood, Drow<span class="tag"></td>
<td></span>+2 Dexterity<span class="tag"></td>
</tr>
</tbody>
</table></span>
</code></pre>
</section>
<section>
<h3 id="code">Code <a href="#code" class="linker" title="anchor to code">#</a></h3>
<p>
<code><b>I</b> am inline</code> with other text
</p>
<pre><code><span class="tag"><code></span>I am inline<span class="tag"></code></span> with other text</code></pre>
<hr>
<pre><code>But <b><em>I</em></b> am a big block of code,
ooh yea..</code></pre>
<pre><code><span class="tag"><pre></span>
<span class="tag"><code></span>
But I am a big block of code,
ooh yea...
<span class="tag"></code></span>
<span class="tag"></pre></span>
</code></pre>
</section>
<!--*************** SECTIONS *******************-->
<section>
<h3 id="sections">Sections <a href="#sections" class="linker" title="anchor to buttons">#</a></h3>
<p>
Structural basics in <b>BONKR</b> are focused on <code><main></code> content. Each section on this page lies within a <em>(you guessed it)</em> <code><section></code>, which are <b>centered</b>, with <b>padding</b>, & <b>max width</b>.
</p>
<pre><code><span class="tag">section {</span>
margin: 0 auto;
max-width: 1100px;
padding: 1.76rem 2.35rem; <span class="tag">}</span></code></pre>
<div class="pd-t-4"></div>
<hr>
<div class="pd-t-4"></div>
<blockquote>
<p>
<code><header></code>, <code><nav></code>, <code><footer></code>, & <code><aside></code> are left alone to avoid "Bootstrapping" your styles. When adding these, you can use the <a href="#flexbox">flex</a> helper classes below for layout; or just write custom styling.
</p>
</blockquote>
<p>
You can <em>obv</em> overwrite the above styling with your preferred <code>max-width</code>, or use the <a href="#max-width">.w-mx-#</a> helper classes below.
</p>
</section>
<!--*************** ARTICLE *******************-->
<article>
<section>
<h3 id="articles">Articles <a href="#articles" class="linker" title="anchor to articles">#</a></h3>
<p>
An <code><article></code> is used to make a full-width bar like this. This is helpful when you want a <code>background-colour</code>, <code>background-image</code>, or <code>width: 100%</code> content. Since the <code><section></code> is a centered container, you can nest one inside to hold your content.
</p>
<pre class="mg-b-7"><code class="allselect"><span class="tag"><article></span>
<span class="tag"><section></span>
<span class="tag"><p></span>
I am an article
<span class="tag"></p></span>
<span class="tag"></section></span>
<span class="tag"></article></span></code></pre>
<div class="pd-t-8"></div>
<h6 class="text-up">Why?</h6>
<blockquote>
<p>
This is done to avoid unecessary classes, using <b>divs</b> like <code>.bar</code> & <code>.inner</code> and such. <b>Yes</b> it's opinionated, and <b>yes</b> it's 3 lines of code you can remove if you so choose.
</p>
</blockquote>
<pre><code><span class="tag">article {</span>
margin: 3.52rem 0;
background: #f2f2f2; <span class="tag">}</span></code></pre>
</section>
</article>
<!--*************** BUTTONS, LINKS *******************-->
<section>
<h3 id="buttons">Buttons <a href="#buttons" class="linker" title="anchor to buttons">#</a></h3>
<p>
...You should be styling your own. In lieu of a generic suite of buttons you"ll find basic hover/focus styles on all of like 5 lines, so as not to conflict with your project.
</p>
<p>
Buttons have no spacing if they're butt-to-butt, but you can add margin classes or group into a <a href="#flexbox">flex</a> container for separation.
</p>
<div class="mg-t-8">
<button class="mg-b-4">button</button><button class="mg-b-4">button</button> <code><br></code><br>
<button class="mg-b-4 mg-r-4">button <span class="text-code">.mg-r-4</span></button><button class="mg-b-4">button</button>
<button class="d-block mg-b-4">button <span class="text-code">.d-block</span></button>
<input class="d-block mg-b-4" type="submit" value="input type='submit'">
<!-- <button class="d-block rnd-4 mg-b-4">button <span class="text-code">.d-block .rnd-4</span></button> -->
<!-- <button class="d-block rnd-10 mg-b-4">button <span class="text-code">.d-block .rnd-10</span></button> -->
<button class="w-full mg-b-4">button <span class="text-code">.w-full</span></button>
</div>
<hr>
<p>
Helper class <code>.btn</code> actually has all of the same styles as <code><button></code>, if you'd like to style a link.
</p>
<a href="" class="btn mg-b-4">a <span class="text-code">.btn</span></a>
<hr>
<p>
Similarly, <code>:disabled</code> and <code>.disabled</code> function the same way.
</p>
<button class="d-block mg-b-4" disabled>button <span class="text-code">:disabled</span></button
><a class="btn mg-b-4 disabled">a <span class="text-code">.btn .disabled</span></a
>
</section>
<!--*************** DIALOG MODAL *******************-->
<section>
<h3 id="dialogs">Dialog Modal <a href="#dialogs" class="linker" title="anchor to dialogs">#</a></h3>
<p>
Each button below has <code>dialog-btn-open</code> class and a <code>data-dialog-id</code> attribute that corresponds to a dialog modal's unique <code>#dialog-<id></code>
</p>
<p>
<button class="dialog-btn-open mg-r-2" data-dialog-id="0">
Open Dialog 1
</button>
<button class="dialog-btn-open" data-dialog-id="foo">
Open Dialog 2
</button>
</p>
<label class="mg-b-0">Basic Setup:</label>
<pre><code class="allselect"><span class="tag"><button class="dialog-btn-open" data-dialog-id="hello"></span>Open Dialog!<span class="tag"><button></span>
<span class="tag"><div id="dialog-hello" class="dialog dialog-event-esc" aria-labelledby="dialog-title-hello"></span>
<span class="tag"><div class="dialog-outer dialog-event-outer-close"></span>
<span class="tag"><div class="dialog-inner"></span>
<span class="tag"><h2 id="dialog-title-hello"></span>Why hello there, I am a dialog...<span class="tag"></h2></span>
<span class="tag"><button class="dialog-btn-close" data-dialog-id="hello"></span>Close Dialog Button<span class="tag"></button></span>
<span class="tag"></div></span>
<span class="tag"></div></span>
<span class="tag"></div></span>
</code></pre>
<label>Optional</label>
<ul>
<li><code>.dialog-event-esc</code> -- This will use the ESC key to close the dialog</li>
<li><code>.dialog-event-outer-close</code> -- This will close the dialog when clicking on the outer area
</li>
</ul>
</section>
<!--*************** LOADER *******************-->
<section>
<h3 id="loader">Loader <a href="#loader" class="linker" title="anchor to loader">#</a></h3>
<p>
<button class="btn" onclick="location.reload()">Reload to See</button>
</p>
<ul>
<li><code>.loader</code> is styled as a fullscreen overlay, at <code>z-index: 500;</code></li>
<li>The small script <code>bonkr-loader.js</code> looks for <code>#bonkr-loader</code> (if it exists)</li>
<li><b>Onload</b>, <code>.show</code> will be removed to hide it</li>
</ul>
<pre><code><span class="tag"><div id="bonkr-loader" class="loader show"></span>
Loader content
<span class="tag"></div></span></code></pre>
</section>
<!--*************** FORM, INPUTS *******************-->
<section>
<h3 id="forms">Forms <a href="#forms" class="linker" title="anchor to forms">#</a></h3>
<form>
<label class="d-block text-center mg-b-3">label <span class="text-code">.d-block .text-center</span></label>
<div class="d-flx flx-row flx-children-1 flx-children-spc-1 flx-spc-1">
<label>label<input type="text" placeholder="Text" style="margin-bottom:0;"></label>
<label>label<input type="email" placeholder="Email" style="margin-bottom:0;"></label>
</div>
<input type="number" placeholder="0">
<input type="tel" placeholder="000-000-0000">
<input type="password" placeholder="********">
<div class="d-flx flx-row flx-children-1 flx-children-spc-1 flx-spc-1">
<select>
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
<input type="range">
</div>
<textarea placeholder="Textarea"></textarea>
<input type="checkbox"><input type="checkbox" checked><br>
<input type="radio" name="radio"><input type="radio" name="radio" checked>
<input type="submit" class="d-block" value="Submit">
</form>
</section>
<!--*************** LAYOUT *******************-->
<section>
<h3>Layout</h3>
<p>
to-do
</p>
</section>
<!--*************** GRID *******************-->
<section>
<h3>Grid</h3>
<p>
to-do
</p>
</section>
<!--*************** PADDING *******************-->
<section>
<h3>Padding</h3>
<blockquote>
<p>
Most semantic elements already have default margins & padding (in <strong>rem</strong>) for base styling, but anything can be customized further.
</p>
</blockquote>
<ul>
<li>Basic setup is <code>.pd-</code> + <strong>direction</strong> + <strong>number</strong></li>
<li><em>Directions:</em> <strong>a</strong> - all, <strong>t</strong> - top, <strong>r</strong> - right, <strong>b</strong> - bottom, <strong>l</strong> - left</li>
<li><em>Numbers:</em> <strong>0-8</strong></li>
<ul>
<li>Which equals <em>0.3rem - 2.35rem</em></li>
<li>Or about <em>5-40px</em> at <code>body: 17px</code></li>
</ul>
</ul>
<p>
<a href="#" class="btn pd-a-3 text-code">.pd-a-3</a>
<a href="#" class="btn pd-a-0 pd-t-3 text-code">.pd-t-3</a>
<a href="#" class="btn pd-a-0 pd-r-5 text-code">.pd-r-5</a>
<a href="#" class="btn pd-a-0 pd-b-2 text-code">.pd-b-2</a>
<a href="#" class="btn pd-a-0 pd-l-7 text-code">.pd-l-7</a>
</p>
<blockquote class="mg-t-6">
Additionally, you can use <code>.pd-ch-#</code> to give direct children the same padding.
</blockquote>
</section>
<!--*************** MARGIN *******************-->
<section>
<h3>Margin</h3>
<ul>
<li>Same as Padding, just using <code>.mg-</code></li>
<li>Can also use <code>.mg-0-auto</code> for centering with <code>margin: 0 auto;</code></li>
</ul>
<div>
<div style="background: #999; display: inline-block; line-height: 0;" class="mg-b-3">
<a href="#" class="btn pd-a-0 mg-a-2 text-code">.mg-a-2</a>
</div>
<div style="background: #999; display: inline-block; line-height: 0;" class="mg-b-3">
<a href="#" class="btn pd-a-0 mg-t-3 text-code">.mg-t-3</a>
</div>
<div style="background: #999; display: inline-block; line-height: 0;" class="mg-b-3">
<a href="#" class="btn pd-a-0 mg-r-8 text-code">.mg-r-8</a>
</div>
<div style="background: #999; display: inline-block; line-height: 0;" class="mg-b-3">
<a href="#" class="btn pd-a-0 mg-b-2 text-code">.mg-b-2</a>
</div>
<div style="background: #999; display: inline-block; line-height: 0;" class="mg-b-3">
<a href="#" class="btn pd-a-0 mg-l-4 text-code">.mg-l-4</a>
</div>
</div>
</section>
<!--*************** FLEXBOX *******************-->
<section>
<h3 id="flexbox">Flexbox <a href="#flexbox" class="linker" title="anchor to flexbox">#</a></h3>
<h4 class="">Examples</h4>
<i>flex, row, wrap, shrink 0, margin -2rem, spacing 2rem</i>
<p>
<code>.d-flx .flx-row .flx-wr-w .flx-children-s-0 .flx-spc-2 .flx-children-spc-2 </code>
</p>
<div class="d-flx flx-row flx-wr-w flx-children-s-0 flx-spc-2 flx-children-spc-2 mg-b-6">
<button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
>
</div>
<i>flex, row, nowrap, shrink 1, spacing 1rem</i>
<p>
<code>.d-flx .flx-row .flx-wr-n .flx-children-s-1 .flx-children-spc-1 </code>
</p>
<div class="mg-b-5 d-flx flx-row flx-wr-n flx-spc-1 flx-children-s-1 flx-children-spc-1">
<button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button
><button type="button">flex child</button>
</div>
<h4 class="mg-b-0">Parent Container Classes</h4>
<p>
<em>Define parent container as display flex, then add classes to customize or define children</em>
</p>
<pre><code class="pd-a-1">
<span class="tag">.d-flx {</span> display: flex; <span class="tag">}</span>
<span class="tag">.flx-row {</span> flex-direction: row; <span class="tag">}</span>
<span class="tag">.flx-col {</span> flex-direction: column; <span class="tag">}</span>
<span class="tag">.flx-wr-n {</span> flex-wrap: nowrap; <span class="tag">}</span>
<span class="tag">.flx-wr-w {</span> flex-wrap: wrap; <span class="tag">}</span>
<span class="tag">.flx-wr-r > * {</span> flex-wrap: wrap-reverse; <span class="tag">}</span>
<span class="tag">.flx-spc-1 {</span> margin-left: -0.3rem; margin-right: -0.3rem; <span class="tag">}</span>
<span class="tag">.flx-spc-2 {</span> margin-left: -0.59rem; margin-right: -0.59rem; <span class="tag">}</span>
<span class="tag">.flx-spc-3 {</span> margin-left: -0.88rem; margin-right: -0.88rem; <span class="tag">}</span>
<span class="tag">.flx-spc-4 {</span> margin-left: -1.18rem; margin-right: -1.18rem; <span class="tag">}</span>
<span class="tag">.flx-children-0 > * {</span> flex: 0; <span class="tag">}</span>
<span class="tag">.flx-children-1 > * {</span> flex: 1; <span class="tag">}</span>
<span class="tag">.flx-children-g-0 > * {</span> flex-grow: 0; <span class="tag">}</span>
<span class="tag">.flx-children-g-1 > * {</span> flex-grow: 1; <span class="tag">}</span>
<span class="tag">.flx-children-s-0 > * {</span> flex-shrink: 0; <span class="tag">}</span>
<span class="tag">.flx-children-s-1 > * {</span> flex-shrink: 1; <span class="tag">}</span>
<span class="tag">.flx-children-spc-1 > * {</span> margin: 0 0.3rem 0.6rem; <span class="tag">}</span>
<span class="tag">.flx-children-spc-2 > * {</span> margin: 0 0.59rem 1.18rem; <span class="tag">}</span>
<span class="tag">.flx-children-spc-3 > * {</span> margin: 0 0.88rem 1.76rem; <span class="tag">}</span>
<span class="tag">.flx-children-spc-4 > * {</span> margin: 0 1.18rem 2.36rem; <span class="tag">}</span>
</code></pre>
<h4 class="mg-b-0">Children Classes</h4>
<p>
<em>Define sizing proportions of flex children</em>
</p>
<pre><code class="pd-a-1">
<span class="tag">.flx-child-0 {</span> flex: 0; <span class="tag">}</span>
<span class="tag">.flx-child-0-5 {</span> flex: 0.5; <span class="tag">}</span>
<span class="tag">.flx-child-1 {</span> flex: 1; <span class="tag">}</span>
<span class="tag">.flx-child-1-5 {</span> flex: 1.5; <span class="tag">}</span>
<span class="tag">.flx-child-2 {</span> flex: 2; <span class="tag">}</span>
<span class="tag">.flx-child-2-5 {</span> flex: 2.5; <span class="tag">}</span>
<span class="tag">.flx-child-3 {</span> flex: 3; <span class="tag">}</span>
<span class="tag">.flx-child-3-5 {</span> flex: 3.5; <span class="tag">}</span>
<span class="tag">.flx-child-4 {</span> flex: 4; <span class="tag">}</span>
</code></pre>
</section>
<!--*************** TO-DO *******************-->
<section>
<h3>TODO</h3>
<ul>
<li>Dropdown buttons section</li>
<li>Update css from other projects</li>
<li>Dialog - lock TAB & SHIFT + TAB into dialog when open</li>
<li>Dark mode class for body</li>
<li>Grid system, w/ breakpoints(?)</li>
<li>Card class, image types</li>
<li>Fieldset, figure, video</li>
<li>sub, cite, etc.</li>
<li>Dialog styling types — center, top-center, TR, TL, etc.</li>
<li>Probably combine flx-spc- & flx-spc-children-</li>
</ul>
</section>
</main>
<!--************************************************************-->
<!-- Loader -->
<div id="bonkr-loader" class="loader">
<div class="pos-abs-center text-center">BONKR</div>
</div>
<!-- Dialog 1 -->
<div class="dialog dialog-event-esc" id="dialog-0" role="dialog">
<div class="dialog-outer dialog-event-outer-close">
<div class="dialog-inner pd-a-4 w-mx-600">
<header role="banner">
<h3>Dialog 1</h3>
<button aria-label="close dialog" class="dialog-btn-close" data-dialog-id="0" type="button">X</button>
</header>
<div>
<p>This dialog will close with the ESC key, because of the <code>"dialog-event-esc"</code> class</p>
<ul>
<li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li><li>Filler text</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Dialog 2 -->
<div class="dialog center" id="dialog-foo" role="dialog">
<div class="dialog-outer dialog-event-outer-close">
<div class="dialog-inner pd-a-4 w-mx-600">
<header role="banner">
<h3>Dialog 2</h3>
<button aria-label="close dialog" class="dialog-btn-close" data-dialog-id="foo" type="button">X</button>
</header>
<div>
<p>
<span class="text-code">.dialog.center</span>
</p>
</div>
</div>
</div>
</div>
<script src="./src/bonkr-dialog.js"></script>
<script src="./src/bonkr-loader.js"></script>
</body>
</html>