-
Notifications
You must be signed in to change notification settings - Fork 5
/
examples.html
748 lines (671 loc) · 23.7 KB
/
examples.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
<!DOCTYPE html>
<!--
<![CDATA[
▄▄· ▄▄▄· ▄• ▄▌▄▄▌ ·▄▄▄▄ ▄▄▄ ▐ ▄
▐█ ▌▪▐█ ▀█ █▪██▌██• ██▪ ██ ▀▄ █·▪ •█▌▐█
██ ▄▄▄█▀▀█ █▌▐█▌██▪ ▐█· ▐█▌▐▀▀▄ ▄█▀▄ ▐█▐▐▌
▐███▌▐█ ▪▐▌▐█▄█▌▐█▌▐▌██. ██ ▐█•█▌▐█▌.▐▌██▐█▌
·▀▀▀ ▀ ▀ ▀▀▀ .▀▀▀ ▀▀▀▀▀• .▀ ▀ ▀█▄▀▪▀▀ █▪
Cauldron Framework
https://github.com/BetSmartMedia/cauldron
(c) Bet Smart Media
Author: Jonathan Cochran <[email protected]>
Website: http://www.betsmartmedia.com
]]>
-->
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Cauldron: A Modular SASS & Boilerplate Framework</title>
<meta name="description" content="">
<meta name="viewport" content="initial-scale=1">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Cookie" type="text/css">
<link rel="stylesheet" href="js/lib/google-code-prettify/tomorrow.css">
<link rel="stylesheet" href="css/cauldron/examples.css">
<script src="js/lib/modernizr-2.7.1.min.js"></script>
<script src="js/lib/google-code-prettify/prettify.js"></script>
<script src="js/lib/google-code-prettify/lang-css.js"></script>
<script src="js/lib/google-code-prettify/lang-scss.js"></script>
</head>
<body onload="prettyPrint()">
<a href="https://github.com/BetSmartMedia/cauldron" class="forkme"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
<aside class="sidebar">
<a href="#top" class="logo"><img src="img/logo.png" /></a>
<h3>Modules</h3>
<ul class="sidebar-nav">
<li><a href="#alerts">Alerts</a></li>
<li><a href="#buttons">Buttons</a></li>
<li><a href="#forms">Forms</a></li>
<li><a href="#lists">Lists</a></li>
<li><a href="#modifiers">Modifiers</a></li>
<li><a href="#panes">Panes</a></li>
</ul>
<h3>Mixins</h3>
<ul class="sidebar-nav">
<li><a href="#animations">Animations</a></li>
<li><a href="#fonts">Fonts</a></li>
<li><a href="#responsive">Responsive</a></li>
<li><a href="#retina">Retina</a></li>
</ul>
<iframe src="http://ghbtns.com/github-btn.html?user=BetSmartMedia&repo=cauldron&type=fork"
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe>
<a href="https://twitter.com/share" data-count="none" data-url="https://github.com/BetSmartMedia/cauldron" class="twitter-share-button" data-lang="en">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</aside>
<div class="content">
<!-- INTRO -->
<section id="top">
<h1 class="title">Cauldron</h1>
<p>
Cauldron is modular SASS framework and HTML boilerplate to
bootstrap your web & mobile projects. Cauldron lets you pick
and choose only the parts you need.
</p>
<h3>Style it your way</h3>
<p>In your projects, you can easily override module styles by:</p>
<ol>
<li>Assigning module variables in your projects
<strong>scss/_config.scss</strong> file:
<pre class="prettyprint lang-css">
$btn-primary-bg: #cc0000;
$btn-primary-colour: white;
</pre>
<span class="footnote">In this example, see
<strong>_buttons.scss</strong>
for a full list of default variables.</span>
</li>
<li>Overriding Cauldron selectors in your projects
<strong>scss/app/_overrides.scss</strong> file:</li>
<pre class="prettyprint lang-css">
.btn {
border: 1px solid black;
@include box-shadow(0 0 1px rgba(black, .25));
}
</pre>
</ol>
<hr />
<a href="https://github.com/BetSmartMedia/cauldron"
target="_blank"
class="btn-primary">Download Source</a> and
<a href="https://twitter.com/share?url=https%3A%2F%2Fgithub.com%2FBetSmartMedia%2Fcauldron&text=Cauldron is modular SASS framework and HTML boilerplate to bootstrap your web apps:"
target="_blank"><strong>tweet it</strong></a>
to show some love.</a>
</section>
<h1 class="section-title">Modules</h1>
<!-- ALERTS -->
<section id="alerts">
<h2>
modules/_alerts.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_alerts.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<h4>Example</h4>
<div class="example">
<div class="alert">
Welcome to our site
</div>
<div class="alert alert-success">
Form successfully submitted
</div>
<div class="alert alert-info">
Nothing but blue skies today
</div>
<div class="alert alert-warning">
Your credit cart expires in 30 days
</div>
<div class="alert alert-danger">
Error: email requried
</div>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<div class="alert">...</div>
<div class="alert alert-success">...</div>
<div class="alert alert-info">...</div>
<div class="alert alert-warning">...</div>
<div class="alert alert-danger">...</div>
</pre>
</section>
<!-- BUTTONS -->
<section id="buttons">
<h2>
modules/_buttons.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_buttons.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<h4>Example</h4>
<div class="example">
<a class="btn">.btn</a>
<a class="btn btn-primary">.primary-btn</a>
<a class="btn btn-secondary">.secondary-btn</a>
<a class="btn btn-tertiary">.tertiary-btn</a>
<a class="btn white-btn">.white-btn</a>
<a class="btn black-btn">.black-btn</a>
<a class="btn btn-primary disabled">.btn-primary .disabled</a>
<a class="btn btn-primary full-width">.btn-primary .full-width</a>
<a class="btn white-btn full-width pill">.white-btn .full-width .pill</a>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<a class="btn">...</a>
<a class="btn btn-primary">...</a>
<a class="btn btn-secondary">...</a>
<a class="btn btn-tertiary">...</a>
<a class="btn white-btn">...</a>
<a class="btn black-btn">...</a>
<a class="btn btn-primary disabled">...</a>
<a class="btn btn-primary full-width">...</a>
<a class="btn white-btn full-width pill">...</a>
</pre>
</section>
<!-- FORMS -->
<section id="forms">
<h2>
modules/_forms.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_forms.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<p>Wrap your form labels / inputs in a parent div with the
<strong>.form-row</strong> class.<br />
<h3>Labels above inputs</h3>
<h4>Example</h4>
<div class="example" style="max-width: 600px">
<div class="form-row">
<label for="email" class="required">Email:</label>
<input type="text" name="email" id="email" required />
</div>
<div class="form-row">
<label for="country" class="required">Country:</label>
<select name="country" id="country">
<option>Canada</option>
<option>USA</option>
<option>Everywhere else</option>
</select>
</div>
<div class="form-row">
<label>Gender:</label>
<div class="radio-group">
<input type="radio" name="gender" id="male" value="male" />
<label for="male">Male</label>
<input type="radio" name="gender" id="female" value="female" />
<label for="female">Female<label>
</div>
</div>
<div class="form-row">
<label>Your favourite band:</label>
<div class="radio-group">
<input type="checkbox" name="band" id="nickelback" value="nickelback" />
<label for="nickelback">Nickelback</label>
<input type="checkbox" name="band" id="wesley_willis" value="wesley_willis" />
<label for="wesley_willis">Wesley Willis<label>
</div>
</div>
<div class="form-row">
<label for="message" class="required">Message:</label>
<textarea name="message" id="message"></textarea>
</div>
<div class="form-row">
<button class="btn-primary">Submit</button>
<button>Forgot Password?</button>
</div>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<div class="form-row">
<label for="email" class="required">Email:</label>
<input type="text" name="email" id="email" required />
</div>
<div class="form-row">
<label for="country" class="required">Country:</label>
<select name="country" id="country">
<option>Canada</option>
<option>USA</option>
<option>Everywhere else</option>
</select>
</div>
<div class="form-row">
<label>Gender:</label>
<div class="radio-group">
<input type="radio" name="gender" id="male" value="male" />
<label for="male">Male</label>
<input type="radio" name="gender" id="female" value="female" />
<label for="female">Female<label>
</div>
</div>
<div class="form-row">
<label>Your favourite band:</label>
<div class="radio-group">
<input type="checkbox" name="band" id="nickelback" value="nickelback" />
<label for="nickelback">Nickelback</label>
<input type="checkbox" name="band" id="wesley_willis" value="wesley_willis" />
<label for="wesley_willis">Wesley Willis<label>
</div>
</div>
<div class="form-row">
<label for="message" class="required">Message:</label>
<textarea name="message" id="message"></textarea>
</div>
<div class="form-row">
<button class="btn-primary">Submit</button>
<button>Forgot Password?</button>
</div>
</pre>
<hr />
<h3>Labels beside inputs</h3>
<p>
To use inline labels simply add the class <strong>.inline</strong>
to <strong>.form-row</strong>.
</p>
<h4>Example</h4>
<div class="example" style="max-width: 600px">
<div class="form-row inline">
<label for="name" class="required">Full name:</label>
<input type="text" name="name" id="name" required />
</div>
<div class="form-row inline">
<label for="income" class="required">Income:</label>
<select name="income" id="income">
<option>$0 - $20,000</option>
<option>$20,000 - $40,000</option>
<option>$40,000 - $60,000</option>
<option>$60,000 - $80,000</option>
<option>$80,000 - $100,000</option>
<option>$100,000+</option>
</select>
</div>
<div class="form-row inline">
<label class="required">Favourite drink:</label>
<div class="radio-group">
<input type="radio" name="drink" id="coke" value="coke" />
<label for="coke">Coke</label>
<input type="radio" name="drink" id="pepsi" value="pepsi" />
<label for="pepsi">Pepsi</label>
<input type="radio" name="drink" id="grape" value="grape" />
<label for="grape">Grape drink</label>
</div>
</div>
<div class="form-row inline">
<button class="btn-primary">Submit</button>
</div>
</div>
<h4>Markup</h4>
<pre class="prettyprint lang-html">
<div class="form-row inline">
<label for="name" class="required">Full name:</label>
<input type="text" name="name" id="name" required />
</div>
<div class="form-row inline">
<label for="income" class="required">Income:</label>
<select name="income" id="income">
<option>$0 - $20,000</option>
<option>$20,000 - $40,000</option>
<option>$40,000 - $60,000</option>
<option>$60,000 - $80,000</option>
<option>$80,000 - $100,000</option>
<option>$100,000+</option>
</select>
</div>
<div class="form-row inline">
<label class="required">Favourite drink:</label>
<div class="radio-group">
<input type="radio" name="drink" id="coke" value="coke" />
<label for="coke">Coke</label>
<input type="radio" name="drink" id="pepsi" value="pepsi" />
<label for="pepsi">Pepsi</label>
<input type="radio" name="drink" id="grape" value="grape" />
<label for="grape">Grape drink</label>
</div>
</div>
<div class="form-row inline">
<button class="btn-primary">Submit</button>
</div>
</pre>
<hr />
<h3>iOS 7 styled forms</h3>
<p>
iOS 7 forms use the same markup as iOS 7 lists below. Because
of that, the css to control the the style of forms within
a list lives in modules/_lists.scss.
</p>
<h4>Example</h4>
<div class="example" style="max-width: 600px">
<ul class="ios-list">
<li>
<h3 class="ios-list-heading">Form Heading</h3>
<ul class="ios-list-content">
<li>
<label for="server">Server</label>
<input type="text" name="server" id="server" />
</li>
<li>
<label for="port">Port</label>
<input type="text" name="port" id="port" />
</li>
<li>
<label for="proxy">Proxy</label>
<input type="text" name="proxy" id="proxy" />
</li>
</ul>
</li>
</ul>
</div>
<h4>Markup</h4>
<pre class="prettyprint lang-html">
<ul class="ios-list">
<li>
<h3 class="ios-list-heading">Form Heading</h3>
<ul class="ios-list-content">
<li>
<label for="server">Server</label>
<input type="text" name="server" id="server" />
</li>
<li>
<label for="port">Port</label>
<input type="text" name="port" id="port" />
</li>
<li>
<label for="proxy">Proxy</label>
<input type="text" name="proxy" id="proxy" />
</li>
</ul>
</li>
</ul>
</pre>
</section>
<!-- LISTS -->
<section id="lists">
<h2>
modules/_lists.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_lists.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<h3>iOS 7 Style Lists</h3>
<h4>Example</h4>
<div class="example">
<ul class="ios-list">
<li>
<h3 class="ios-list-heading">List Heading</h3>
<ul class="ios-list-content">
<li>Standard li</li>
<li><a href="#lists">Boring link</a></li>
<li class="li-btn"><a href="#lists">Block link</a></li>
<li class="li-btn">
<a href="#lists">
Block link with icon
<i class="icon-right-open right"></i>
</a>
</li>
</ul>
</li>
</ul>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<ul class="ios-list">
<li>
<h3 class="ios-list-heading">List Heading</h3>
<ul class="ios-list-content">
<li>Standard li</li>
<li><a href="#lists">Boring link</a></li>
<li class="li-btn"><a href="#lists">Block link</a></li>
<li class="li-btn">
<a href="#lists">
Block link with icon
<i class="icon-right-open right"></i>
</a>
</li>
</ul>
</li>
</ul>
</pre>
</section>
<!-- MODIFIERS -->
<section id="modifiers">
<h2>
modules/_modifiers.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_modifiers.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<p>
Modifiers are 1 line pieces of code which make a small
modification on existing behaviour. See the
<strong>_modifiers.scss</strong>
file for a full list of available modifiers.
</p>
<h4>Example</h4>
<div class="example">
<div class="opacity-50">
50% opacity
</div>
<span class="font-150">Font at 150% size</span>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<div class="opacity-50">
50% opacity
</div>
<span class="font-150">Font at 150% size</span>
</pre>
</section>
<!-- PANES -->
<section id="panes">
<h2>
modules/_panes.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/modules/_panes.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<p>
Panes are simply content blocks. You can optionally include
a pane header and pane content child div which provides some
padding.
<p>
<h4>Example</h4>
<div class="example">
<div class="pane">
<div class="pane-header">
Pane Header
</div>
<div class="pane-content">
Pane Content
</div>
</div>
</div>
<h4>Markup</h4>
<pre class="prettyprint">
<div class="pane">
<div class="pane-header">
Pane Header
</div>
<div class="pane-content">
Pane Content
</div>
</div>
</pre>
</section>
<h1 class="section-title">Mixins</h1>
<section id="animations">
<h2>
mixins/_animations.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/mixins/_animations.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<pre class="prettyprint large no-bg">
@mixin keyframe($animation-name) { ... } // Cross-browser keyframe css function
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
@include keyframe(bouncy-ball) {
from {
top: -50px;
}
to {
top: 0px;
}
}
.ball {
@include animation(bouncy-ball .5s infinite);
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
@mixin animation($animation) // Cross-browser supported animation
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.ball {
@include animation(bouncy-ball .5s infinite);
}
</pre>
</section>
<section id="fonts">
<h2>
mixins/_fonts.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/mixins/_fonts.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<pre class="prettyprint large no-bg">
/**
* @param $size - Font size in rem with px fallback for older browsers
* @param $line-height - (Optional) default is font-size * 1.5
*/
@mixin font-size($size, $line-height)
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.lead {
@include font-size(2);
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
@mixin text-truncate() // Truncate text with ellipsis
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.lead {
@include font-size(2);
@include text-truncate();
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
/**
* @param $font-family - Font name for reference in css
* @param $file-path - Name of font file without extension
* @param $weight - Normal, bold, or numeric weight e.g. 100, 500, 700
* @param $style - Normal, italic
* @param $asset-pipeline - (Bool) Default false. If true, uses font-url defined in config.rb
*/
@mixin font-face($font-family, $file-path, $weight, $style, $asset-pipeline)
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.lead {
@include font-size(2);
@include text-truncate();
@include font-face('GaramondPro', '../fonts/GaramondPro');
}
</pre>
</section>
<section id="responsive">
<h2>
mixins/_responsive.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/mixins/_responsive.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<pre class="prettyprint large no-bg">
/**
* @param $breakpoint - Custom breakpoint, e.g.: max-width: 660px
* @param $media - Media types. Default is 'all'
*/
@mixin respond($breakpoint, $media) { ... }
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.content {
// 80% font size for smaller devices
@include respond('max-width: 600px') {
font-size: 80%;
}
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
/**
* @param $breakpoint - Defined list of sizes and devices:
* - small, medium, large, xlarge
* - small-phones, phones, tablets, desktop
* @param $media - Media types. Default is 'all'
*/
@mixin breakpoint($breakpoint, $media) { ... }
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.content {
// css for tablets
@include breakpoint(tablets) {
//...
}
// css for phones
@include breakpoint(phones) {
// ...
}
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
/**
* @param $breakpoint - Defined list of sizes and devices:
* - small, medium, large, xlarge
* - small-phones, phones, tablets, desktop
* - or custom query: max-width: 660px
*/
@mixin hidden($breakpoint)
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.primary-nav {
@include hidden(phones); // hide nav on mobile devices
}
</pre>
<hr />
<pre class="prettyprint large no-bg">
/**
* @param $breakpoint - Defined list of sizes and devices:
* - small, medium, large, xlarge
* - small-phones, phones, tablets, desktop
* - or custom query: max-width: 660px
*/
@mixin visible($breakpoint)
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
.mobile-nav {
display: none;
@include visible(phones); // show nav on mobile devices
}
</pre>
</section>
<section id="retina">
<h2>
mixins/_retina.scss
<a href="https://github.com/BetSmartMedia/cauldron/blob/master/scss/cauldron/mixins/_retina.scss" target="_blank" class="btn white-btn pill view-source">view source</a>
</h2>
<p>
<a href="http://www.retinajs.com" target="_blank">Retina.js</a>
helper mixin for applying high-resolution background
images from Nathan Crank.
</p>
<pre class="prettyprint large no-bg">
/**
* @param $path - Path to image
* @param $ext - Extensions. Default '.jpg'
* @param $w - Width. Default 'auto'
* @param $h - Height. Default 'auto'
*/
@mixin at2x($path, $ext, $w, $h)
</pre>
<h4>Usage</h4>
<pre class="prettyprint lang-scss">
body {
// will output background.jpg and [email protected] depending on
// the device resolution
@include at2x('background');
}
</pre>
</section>
</div>
</body>
</html>