-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
861 lines (792 loc) · 34.5 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
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Spirit | A simple CSS Framework">
<meta name="keywords" content="spirit, css, web, design, develop, scss">
<link rel="icon" href="./static/spirit.svg" type="image/svg" sizes="16x16">
<title>Spirit | A simple CSS framework</title>
<link rel="stylesheet" href="./scss/fonts.scss">
<link rel="stylesheet" href="./scss/main.scss">
<link rel="stylesheet" href="prism.css">
<script defer src="./main.js"></script>
<script defer src="./prism.js"></script>
</head>
<style>
r-cell {
background-color: black;
color: white;
padding: 0.25rem 0.5rem;
}
r-grid {
margin: 1rem 0;
}
r-grid.scale-text {
opacity: 0.85;
}
main {
color: rgba(0, 0, 0, 0.75);
padding-top: min(10vh, 2rem);
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: black;
}
#loader {
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
letter-spacing: 1vw;
font-family: sans-serif;
font-weight: 200;
font-size: 8vw;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
overflow: hidden;
z-index: 9999;
background-color: white;
color: #333;
padding: 1rem;
transition: 1s opacity ease-in-out;
}
@keyframes loader {
0% {
transform: translateX(-100%) scaleX(0);
}
50% {
transform: translateX(0) scaleX(1);
}
100% {
transform: translateX(100%);
}
}
.progress-bar {
border-radius: 60px;
overflow: hidden;
max-width: 480px;
width: 100%;
}
.progress-bar span {
display: block;
}
.bar {
background: rgba(0, 0, 0, 0.075);
}
.progress {
animation: loader 4s ease-out infinite;
background: #D4D4D4;
color: #fff;
padding: 3px;
width: 100%;
transform: scaleX(0);
}
</style>
<body>
<div id="loader">
SPIRIT
<div class="progress-bar">
<span class="bar">
<span class="progress"></span>
</span>
</div>
</div>
<div class="scroll-wrapper">
<main class="breakout-wrapper">
<figure>
<picture class="flex-center">
<img class="bg-black border border--white" src="./static/spirit.svg"
style="width: 128px; height: 128px; border-radius: 50%;" alt="spirit logo">
</picture>
</figure>
<h1 class="text-center">Spirit</h1>
<p class="text-center italic scale-text">Light, modern & customisable</p>
<div class="flex-center">
<iframe class="mr-1 is-hidden-desktop"
src="https://ghbtns.com/github-btn.html?user=siddharthsham&repo=spirit&type=star&"
frameborder="0" width="50px" scrolling="0" height="20px"></iframe>
<iframe class="is-hidden-desktop"
src="https://ghbtns.com/github-btn.html?user=siddharthsham&type=follow" frameborder="0"
scrolling="0" width="155" height="20" title="GitHub"></iframe>
<iframe class="mr-1 is-hidden-touch"
src="https://ghbtns.com/github-btn.html?user=siddharthsham&repo=spirit&type=star&&size=large"
frameborder="0" width="70px" scrolling="0" height="30px"></iframe>
<iframe class="is-hidden-touch"
src="https://ghbtns.com/github-btn.html?user=siddharthsham&type=follow&size=large" frameborder="0"
scrolling="0" width="235" height="30" title="GitHub"></iframe>
</div>
<p class="mt-5">
A customisable CSS framework that strives to be small, yet complete. With a strong focus on
typography, clean spacing, and semantic naming conventions,
Spirit is the perfect CSS microframework for everyone. <br>
</p>
<hr>
<h1>Variables</h1>
<p>A convenient set of Sass variables for you to create your own version of Spirit.</p>
<pre class="pre"><code class="language-scss code">
// native font snippet from Bootstrap
$native-sans-font: -apple-system,
BlinkMacSystemFont,
"Segoe UI",
"Roboto",
"Helvetica Neue",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol" !default;
$native-serif-font: Georgia,
Times,
"Times New Roman",
serif;
$sans-font: 'Public Sans',
sans-serif;
$serif-font: 'Butler',
serif;
// breakpoint sizes
$mobile: 768px;
$tablet: 769px;
$desktop: 1024px;
$widescreen: 1216px;
$fullhd: 1408px;
// grid vars
$grid-tc: repeat(12, 1fr);
$grid-tr: repeat(12, 1fr);
$col-gap: 1rem;
$row-gap: 1rem;
$grid-cs: 1;
$grid-ce: -1;
$grid-rs: 1;
$grid-re: -1;
// colors
$navy: #001F3F;
$blue: #0074D9;
$aqua: #7FDBFF;
$teal: #39CCCC;
$olive: #3D9970;
$green: #2ECC40;
$lime: #01FF70;
$yellow: #FFDC00;
$orange: #FF851B;
$red: #FF4136;
$fuchsia: #F012BE;
$purple: #B10DC9;
$maroon: #85144B;
$white: #FFFFFF;
$gray: #AAAAAA;
$silver:#DDDDDD;
$black: #111111;
// link styles
$link-dark: #0F52BA;
$link-light: #0080FF;
$link-mid: #0074D9;
</code></pre>
<hr>
<h1>Typography</h1>
<p>Opiniated styles are applied on the HTML heading elements in order to fluidly style them. Use the
variables
available to
customise them to your need.
</p>
<h3>Typefaces used</h3>
<p>These are freely available, high quality typefaces.
<a target="_blank" rel="noopener noreferrer"
href="https://fabiandesmet.com/portfolio/butler-font/">Butler</a>,
<a target="_blank" rel="noopener noreferrer" href="https://public-sans.digital.gov/">Public
Sans</a>
</p>
<div class="row breakout">
<div class="column no-pad">
<figure>
<picture>
<source srcset="./static/butler.webp" type="image/webp">
<img src="./static/butler.jpg" alt="Butler">
</picture>
</figure>
</div>
<div class="column no-pad">
<figure>
<picture>
<source srcset="./static/public-sans.webp" type="image/webp">
<img src="./static/public-sans.jpg" alt="Public Sans">
</picture>
</figure>
</div>
</div>
<h3>Headings</h3>
<code class="code lang-html">
<h1>Heading 1</h1>
</code>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<h3>Custom sizes</h3>
<p>Custom sizes are not fluid, but they let you 'lock' the font-size of text across all device widths.</p>
<code class="code lang-html">
<p class="size-1">.size-1</p>
</code>
<p class="size-1">.size-1</p>
<p class="size-2">.size-2</p>
<p class="size-3">.size-3</p>
<p class="size-4">.size-4</p>
<p class="size-5">.size-5</p>
<p class="size-6">.size-6</p>
<p class="size-7">.size-7</p>
<h3>Blockquotes</h3>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation
organization, WWF works in 100 countries and is supported by 1.2 million members in the United States
and close to 5 million globally.
</blockquote>
<pre class="pre"><code class="code lang-html">
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation
organization, WWF works in 100 countries and is supported by 1.2 million members in the United States
and close to 5 million globally.
</blockquote>
</code></pre>
<h3>Links</h3>
<p>
<a target="_blank" rel="noopener noreferrer" href="#">Links</a> are specially styled to look better in a
block of text.
</p>
<code class="code lang-html">
<a href="www.example.com">Cool link :D</a>
</code>
<h3>Scale text</h3>
<p>A utility class to make the font-size of text content slightly smaller than it's parent. It uses fluid
sizing
in order to be perfectly responsive.</p>
<p class="scale-text">This sentence, for example, is scaled down.</p>
<code class="code lang-html">
<p class="scale-text">This sentence, for example, is scaled down.</p>
</code>
<h3 class="title">Title</h3>
<p>This provides a sans-serif title font, with extra weight. </p>
<code class="code lang-html">
<p class="title">Sans-serif title.</p>
</code>
<hr>
<h1>Grids:</h1>
<p>Use Grids to create responsive layouts that flow in two dimensions. The default grid is 12x12 cells, this
can
easily be extended to any arbitrary number by using CSS variables.
This one stays the same across all viewports:</p>
<r-grid style="--columns:6; --rows:6">
<r-cell rowspan=2>, 2</r-cell>
<r-cell colspan=3>3</r-cell>
<r-cell></r-cell>
<r-cell colspan=7-8>7-8</r-cell>
<r-cell colspan=2+2>2+2</r-cell>
<r-cell colspan=5-8>5-8</r-cell>
<r-cell colspan=1-4>1-4</r-cell>
<r-cell colspan=6..>6..</r-cell>
<r-cell colspan=2..>2..</r-cell>
<r-cell colspan=4..>4..</r-cell>
<r-cell rowspan=5-6 colspan=1-2>1-2, 5-6</r-cell>
<r-cell colspan=4-5>4-5</r-cell>
</r-grid>
<pre class="pre"><code class="code lang-html">
<r-grid style="--columns:6; --rows:6"><br />
<r-cell rowspan=2>, 2</r-cell><br />
<r-cell colspan=3>3</r-cell><br />
<r-cell></r-cell><br />
<r-cell colspan=7-8>7-8</r-cell><br />
<r-cell colspan=2+2>2+2</r-cell><br />
<r-cell colspan=5-8>5-8</r-cell><br />
<r-cell colspan=1-4>1-4</r-cell><br />
<r-cell colspan=6..>6..</r-cell><br />
<r-cell colspan=2..>2..</r-cell><br />
<r-cell colspan=4..>4..</r-cell><br />
<r-cell rowspan=5-6 colspan=1-2>1-2, 5-6</r-cell><br />
<r-cell colspan=4-5>4-5</r-cell><br />
</r-grid>
</code></pre>
<br>
<p>This is a responsive grid:</p>
<r-grid columns=6 columns-s=3 rows=2>
<r-cell colspan=2 colspan-s=row>2 / row</r-cell>
<r-cell colspan=3-6 colspan-s=row>3, 6 / row</r-cell>
<r-cell colspan=1-2 colspan-s=1>1-2 / 1</r-cell>
<r-cell colspan=3.. colspan-s=2..>3.. / 2</r-cell>
</r-grid>
<pre class="pre">
<code class="code lang-html">
<r-grid columns=6 columns-s=3 rows=2><br />
<r-cell colspan=2 colspan-s=row>2 / row</r-cell><br />
<r-cell colspan=3-6 colspan-s=row>3, 6 / row</r-cell><br />
<r-cell colspan=1-2 colspan-s=1>1-2 / 1</r-cell><br />
<r-cell colspan=3.. colspan-s=2..>3.. / 2</r-cell><br />
</r-grid>
</code>
</pre>
<p class="italic">Note: This is a heavily modified version of the
<a target="_blank" rel="noopener noreferrer" href="https://rsms.me/raster/">Raster
Grid
Subsystem</a>.
</p>
<hr>
<h3>Flexbox utilities:</h3>
<p>Composable flexbox utilities allows you to quickly style content that flows in one-dimension.
Applying class="container row is-fullheight flex-center" to a div element creates the following content:
</p>
<div class="container breakout row is-fullheight flex-center bg-silver">
<p class="size-7">Lorem ipsum.</p>
</div>
<pre class="pre"><code class="code lang-html">
<div class="container row is-fullheight flex-center bg-silver"><br />
<p class="size-7">Lorem ipsum.</p><br />
</div>
</code></pre>
<p>Infinitely nestable rows and columns allow you to effortlessly create incredibly
complex
layouts. Use the
full power
of Flexbox and Grid to bend CSS to your will.
</p>
<div class="container breakout row bg-silver" style="min-height: 9rem;">
<div class="row border border--black">
<div class="column border border--black">Row 1, Column 1</div>
<div class="column border border--black">Row 1, Column 2</div>
<div class="column border border--black">Row 1, Column 3</div>
</div>
<div class="row border border--black">
<div class="column border border--black">Row 2, Column 1</div>
<div class="column border border--black">Row 2, Column 2</div>
</div>
</div>
<pre class="pre"><code class="code lang-html">
<div class="container breakout row bg-silver" style="min-height: 9rem;"><br />
<div class="row border border--black"><br />
<div class="column border border--black">Row 1, Column 1</div><br />
<div class="column border border--black">Row 1, Column 2</div><br />
<div class="column border border--black">Row 1, Column 3</div><br />
</div><br />
<div class="row border border--black"><br />
<div class="column border border--black">Row 2, Column 1</div><br />
<div class="column border border--black">Row 2, Column 2</div><br />
</div><br />
</div>
</code></pre>
<p class="italic">Note: Fixed width content within a flex container may overflow on smaller displays.</p>
<hr>
<h1>Forms:</h1>
<p>Simple styles with rational defaults, to provide a cohesive design. </p>
<form action="#">
<div class="field">
<label for="name">Your name: </label>
<input type="text" placeholder="John Smith" />
<div class="help">Don't worry, your information is safe with us.</div>
</div>
<div class="field">
<label for="email">Email ID: </label>
<input type="email" placeholder="[email protected]" />
</div>
<div class="field">
<label for="name">Country: </label>
<select>
<option>Select dropdown</option>
<option>With options</option>
</select>
</div>
<div class="field">
<label for="textarea">Textarea:</label>
<textarea class="textarea" placeholder="e.g. Hello world"></textarea>
</div>
<button type="button">Button</button>
<p>You can use the color utilities to mix and match your own styles of elements. For example:</p>
<button type="button" class="bg-green white border border--black lighten">Custom button</button>
</form>
<pre class="pre"><code class="code lang-html">
<form action="#"><br />
<div class="field"><br />
<label for="name">Your name: </label><br />
<input type="text" placeholder="John Smith" /><br />
<div class="help">Don't worry, your information is safe with us.</div><br />
</div><br />
<div class="field"><br />
<label for="email">Email ID: </label><br />
<input type="email" placeholder="[email protected]" /><br />
</div><br />
<div class="field"><br />
<label for="name">Country: </label><br />
<select><br />
<option>Select dropdown</option><br />
<option>With options</option><br />
</select><br />
</div><br />
<div class="field"><br />
<label for="textarea">Textarea:</label><br />
<textarea class="textarea" placeholder="e.g. Hello world"></textarea><br />
</div><br />
<button type="button">Button</button><br />
<p>You can use the color utilities to mix and match your own styles of elements. For example:</p><br />
<button type="button" class="bg-green white border border--black lighten">Custom button</button><br />
</form>
</code></pre>
<hr>
<h1>Tables:</h1>
<p>Tables are minimally styled, and come with a handy .table-container class for horizontally scrollable
tables.
</p>
<div class="table-container">
<table>
<thead>
<tr>
<th>Name</th>
<th>ID</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
<th>Favorite Color</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jim</td>
<td>00001</td>
<td>Green</td>
<td>Green</td>
<td>Green</td>
<td>Red</td>
<td>Blue</td>
<td>Blue</td>
<td>Blue</td>
<td>Blue</td>
<td>Blue</td>
<td>Blue</td>
</tr>
<tr>
<td>Sue</td>
<td>00002</td>
<td>Red</td>
<td>Green</td>
<td>Green</td>
<td>Green</td>
<td>Green</td>
<td>Blue</td>
<td>Blue</td>
<td>Red</td>
<td>Red</td>
<td>Red</td>
</tr>
<tr>
<td>Barb</td>
<td>00003</td>
<td>Red</td>
<td>Red</td>
<td>Red</td>
<td>Red</td>
<td>Red</td>
<td>Blue</td>
<td>Blue</td>
<td>Green</td>
<td>Green</td>
<td>Green</td>
</tr>
</tbody>
</table>
</div>
<pre class="pre"><code class="code lang-html">
<!-- <br />
Standard HTML markup will suffice,<br />
for most use cases. The wrapper class <br />
is provided for cases where overflow is expected.<br />
--><br />
<div class="table-container"><br />
<!-- Table markup --><br />
</div>
</code></pre>
<hr>
<h1>Images</h1>
<p>Images are styled using an aspect ratio box technique. It requires you to add the aspect ratio of the
image
using the style attribute.</p>
<p>Random images from Unsplash:</p>
<div class="row">
<div class="column no-pad">
<figure style="--aspect-ratio:1.5;">
<picture>
<source srcset="./static/1.webp" type="image/webp">
<img src="./static/1.jpg" alt="Unsplash">
</picture>
<figcaption>This image uses --aspect-ratio: 1.5</figcaption>
</figure>
</div>
</div>
<div class="row is-mobile">
<div class="column no-pad">
<figure style="--aspect-ratio:768/1023;">
<picture>
<source srcset="./static/2.webp" type="image/webp">
<img src="./static/2.jpg" alt="Unsplash">
</picture>
<figcaption>This image uses --aspect-ratio: 1344/1789</figcaption>
</figure>
</div>
<div class="column no-pad">
<figure style="--aspect-ratio:768/1152;">
<picture>
<source srcset="./static/3.webp" type="image/webp">
<img src="./static/3.jpg" alt="Unsplash">
</picture>
<figcaption>This image uses --aspect-ratio: 860/1290</figcaption>
</figure>
</div>
</div>
<pre class="pre"><code class="code lang-html">
<figure style="--aspect-ratio:1.5;"><br />
<picture><br />
<source srcset="./static/1.webp" type="image/webp"><br />
<img src="./static/1.jpg" alt="Unsplash"><br />
</picture><br />
<figcaption>
This image uses --aspect-ratio: 1.5
</figcaption><br />
</figure>
<figure style="--aspect-ratio:768/1023;"><br />
<picture><br />
<source srcset="./static/2.webp" type="image/webp"><br />
<img src="./static/2.jpg" alt="Unsplash"><br />
</picture><br />
<figcaption>
This image uses --aspect-ratio: 1344/1789
</figcaption><br />
</figure>
</code></pre>
<p>These images will maintain their aspect ratio across all viewports. In combination with using the
picture tag, responsive images has never been easier.
</p>
<p class="italic">Note: Based on code from this <a target="_blank" rel="noopener noreferrer"
href="https://css-tricks.com/aspect-ratio-boxes/">article</a>. In particular, Thierry Koblentz's
work.
</p>
<hr>
<h1>Elements</h1>
<p>A collection of other useful elements and styles.</p>
<h3>Box</h3>
<div class="box">
<p>
The box element is a simple container with padding and shadow. It can contain any arbitrary content.
</p>
</div>
<pre class="pre"><code class="code lang-html">
<div class="box"><br />
<p>Box element.</p><br />
</div>
</code>
</pre>
<h3>Lists</h3>
<div class="row is-mobile">
<div class="column no-pad">
<ul>
Unordered lists:
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ul>
</div>
<div class="column no-pad">
<ol>
Ordered lists:
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
</div>
</div>
<h3>Horizontal rule:</h3>
<p>A restyled horizontal rule element you can use to add class to your design.</p>
<hr>
<h3>Article wrapper & breakout</h3>
<p>
It's common to see articles limit the width of the content on wide displays in order to improve
readability.
Spirit provides a Grid powered wrapper for this situation, which is completely responsive. As a bonus,
it
also supplies a customisable .breakout class
which you can use to allow elements to be fullwidth, responsively.
</p>
<article class="container breakout breakout-wrapper bg-silver mt-5 mb-5" style="--breakout-width:480px">
<h3>Example</h3>
<p>This content will only extend until a max-width of 480px, beyond which it will start wrapping. This
width
is customisable inline. The default can be customised in the _variables.scss file.
</p>
<p class="breakout italic mb-5 mt-5">
On the other hand, this content is placed within a .breakout class. This means that it will always
span
the fullwidth of the viewport. This is especially useful for images or charts.
</p>
</article>
<p>This effect is easily nestable, as seen on this very element. All the content on this page has been
wrapped in this style, with this element being wrapped twice.
</p>
<p class="italic">Note: Code based on this <a target="_blank" rel="noopener noreferrer"
href="https://cloudfour.com/thinks/breaking-out-with-css-grid-layout/">article</a>.</p>
<hr>
<h1>Spacing utilities</h1>
<p>
Use these utility classes to perfectly position your content using margins and padding.
</p>
<p>Available class prefixes:</p>
<div class="row is-mobile">
<div class="column no-pad">
<ul>
<li>.mt</li>
<li>.mr</li>
<li>.mb</li>
<li>.ml</li>
</ul>
</div>
<div class="column no-pad">
<ul>
<li>.pt</li>
<li>.pr</li>
<li>.pb</li>
<li>.pl</li>
</ul>
</div>
</div>
<p>In order to use these classes, combine a prefix with one of the following levels to achieve the desired
result. For example, .mr-3 defines margin-right: 1.75 rem.</p>
<table>
<thead>
<tr>
<th>Level</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1</td>
<td>0.75 rem</td>
</tr>
<tr>
<td>2</td>
<td>1.25 rem</td>
</tr>
<tr>
<td>3</td>
<td>1.75 rem</td>
</tr>
<tr>
<td>4</td>
<td>2.25 rem</td>
</tr>
<tr>
<td>5</td>
<td>2.75 rem</td>
</tr>
</tbody>
</table>
<p>Special class: <strong>.mx-auto</strong> sets margin: auto on the left and right. Useful for centering
content,
but honestly, you should just use flexbox.
</p>
<hr>
<h1>Responsive helpers</h1>
<p>A host of helper classes to conditionally display content based on the viewport width. There are 9 helper
classes. <span class="is-hidden-touch">Resize your window to see the effect.</span>
</p>
<ol>
<li class="is-hidden-mobile"> This sentence is hidden on mobile devices. </li>
<li class="is-hidden-tablet-only"> This sentence is hidden on tablets. </li>
<li class="is-hidden-desktop-only"> This sentence is hidden on desktops. </li>
<li class="is-hidden-widescreen-only"> This sentence is hidden on widescreen. </li>
<li class="is-hidden-touch"> This sentence is hidden upto touch devices. </li>
<li class="is-hidden-tablet"> This sentence is hidden from tablet and above. </li>
<li class="is-hidden-desktop"> This sentence is hidden from desktop and above. </li>
<li class="is-hidden-widescreen"> This sentence is hidden from widescreen and above. </li>
<li class="is-hidden-fullhd"> This sentence is hidden from fullhd and above. </li>
</ol>
<p class="italic">Note: These helpers were taken directly from <a target="_blank" rel="noopener noreferrer"
href="https://bulma.io/">Bulma CSS</a>.
</p>
<hr>
<h1>Color helpers</h1>
<p>Spirit includes a tiny set of classes to quickly style the background, font-color or border-color of any
element.</p>
<div>
<r-grid columns=3 columns-s=2 columns-l=9 rows=12 class="scale-text">
<r-cell rowspan=6 class="bg-navy aqua"> <code class="flex-center ">.bg-navy .aqua</code>
</r-cell>
<r-cell rowspan=6 class="bg-blue aqua"> <code class="flex-center ">.bg-blue .aqua</code>
</r-cell>
<r-cell rowspan=6 class="bg-aqua navy"> <code class="flex-center ">.bg-aqua .navy</code>
</r-cell>
<r-cell rowspan=6 class="bg-teal black"> <code class="flex-center ">.bg-teal .black</code>
</r-cell>
<r-cell rowspan=6 class="bg-olive black"> <code class="flex-center">.bg-olive .black</code>
</r-cell>
<r-cell rowspan=6 class="bg-green white"> <code class="flex-center ">.bg-green .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-lime black"> <code class="flex-center ">.bg-lime .black</code>
</r-cell>
<r-cell rowspan=6 class="bg-yellow red"><code class="flex-center ">.bg-yellow .red</code>
</r-cell>
<r-cell rowspan=6 class="bg-orange white"><code class="flex-center ">.bg-orange .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-red white"> <code class="flex-center ">.bg-red .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-fuchsia white"> <code class="flex-center ">.bg-fuchsia
.white</code></r-cell>
<r-cell rowspan=6 class="bg-purple white"> <code class="flex-center ">.bg-purple .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-maroon white"> <code class="flex-center ">.bg-maroon .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-black white"> <code class="flex-center ">.bg-black .white</code>
</r-cell>
<r-cell rowspan=6 class="bg-gray black"> <code class="flex-center ">.bg-gray .black</code>
</r-cell>
<r-cell rowspan=6 class="bg-silver black"><code class="flex-center ">.bg-silver .black</code>
</r-cell>
<r-cell rowspan=6 colspan=2 class="bg-white black border border--black"><code
class="flex-center">.bg-white
.black .border .border--black</code></r-cell>
</r-grid>
<p class="italic">Note: Based on <a target="_blank" rel="noopener noreferrer"
href="https://clrs.cc">clrs.cc</a> by
mrmrs</p>
</div>
<hr>
<p>First stable release with proper documentation is on the way. Stay tuned!</p>
<footer>
<pre>
<code>
const Spirit = {
designer: "siddharth_sham",
developer: "siddharth_sham",
repository: <a rel="noopener noreferrer" target="_blank" href="https://github.com/SiddharthSham/spirit">repository</a>
portfolio: <a target="_blank" rel="noopener noreferrer" class="is-hidden-touch" href="https://siddharthsham.github.io">"https://siddharthsham.github.io"</a><a target="_blank" rel="noopener noreferrer" class="is-hidden-desktop" href="https://siddharthsham.github.io">link</a>
};
</code>
</pre>
</footer>
</main>
</div>
</body>
</html>