This repository has been archived by the owner on Mar 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhelpless.1.0.1.less
973 lines (908 loc) · 30.1 KB
/
helpless.1.0.1.less
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
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
/* --------------------------------------------------------------------------------------
* HelpLess is released under the MIT license.
*
* Copyright (C) 2011 by Matt Woodfield
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* --------------------------------------------------------------------------------------
*
* HelpLess - A lot of Less help
* --------------------------------------------------------------------------------------
*
* @What is it:
* HelpLess is a Helper Library for the brilliant LESS dynamic stylesheet language.
* Read more about LESS: http://lesscss.org/
*
* I have tried to make HelpLess as all-encompasing as possible with support for dynamic
* grids and page starter themes as well as all the css3 features I could think of.
* Unlike other libraries, HelpLess has an invisible footprint until you call a mixin
* so if you import HelpLess but don't use it, it will not increase your compiled file size
*
* @thanks:
* Eric Meyer for html reset - http://meyerweb.com/eric/tools/css/reset/
* Necolas for normalize - https://github.com/necolas/normalize.css
*
* @How to use:
* Import helpless.x.x.x.less into your main style.less file.
*
* @Author:
* Matt Woodfield - @m6tt
*
* @Reference:
* ------------------------------------------------------------------------------
* BASICS => syntax
* ------------------------------------------------------------------------------
* - .reset => #hl.reset() - call outside of element
* - .normalize => #hl.normalize - call outside of element
* - .clearfix => #hl.clearfix()
* - .centered => #hl.centered(width)
* - .border => #hl.border(color)
* - .opacity => #hl.opacity(value)
* - .round-all-corners => #hl.round-all-corners(radius)
* - .rounded-corners => #hl.rounded-corners(topLeft, topRight, bottomRight, bottomLeft)
* - .transition => #hl.transition(property, duration, ease, delay)
* - .drop-shadow => #hl.drop-shadow(x, y, blur, color)
* - .inner-shadow => #hl.inner-shadow(x, y, blur, color)
* - .text-shadow => #hl.text-shadow(x, y, blur, color)
* - .background-gradient => #hl.background-gradient(colorFrom, colorTo, fallbackColor, fallbackImageUrl)
* - .scale => #hl.scale(amount)
* - .scaleX => #hl.scaleX(amount)
* - .scaleY => #hl.scaleY(amount)
* - .rotate => #hl.rotate(degrees)
* - .rotateX => #hl.rotateX(degrees)
* - .rotateY => #hl.rotateY(degrees)
* - .skew => #hl.skew(angleX, angleY)
* - .skewX => #hl.skewX(angleX)
* - .skewY => #hl.skewY(angleY)
* - .translate => #hl.translate(x, y)
* - .translateX => #hl.translateX(x)
* - .translateY => #hl.translateY(y)
* - .matrix => #hl.matrix(n, n, n, n, n, n)
*
* ------------------------------------------------------------------------------
* GRID => syntax
* ------------------------------------------------------------------------------
* - .grid => namespace, do not call directly, use .make or one of the predefined grid makers
* - .make => #hl.grid.make(width, colNumber, gutterWidth)
* - .1200 => #hl.grid.1200();
* - .1120 => #hl.grid.1120();
* - .1040 => #hl.grid.1040();
* - .960 => #hl.grid.960();
* - .880 => #hl.grid.880();
* - .800 => #hl.grid.800();
* - .720 => #hl.grid.720();
* - .640 => #hl.grid.640();
* - .560 => #hl.grid.560();
* - .480 => #hl.grid.480();
* - .400 => #hl.grid.400();
* - .320 => #hl.grid.320();
* - .240 => #hl.grid.240();
* - .row => #hl.grid.row();
* - .col => #hl.grid.col(colSpan);
*
* ---------------------------------------
* TYPOGRAPHY
* ---------------------------------------
* - .typo => namespace, do not call directly
* - .serif => #hl.typo.serif(webfont-name-optional);
* - .sans => #hl.typo.sans(webfont-name-optional);
* - .columns => #hl.typo.columns(count, gap)
*
* ---------------------------------------
* IMAGES
* ---------------------------------------
* - .img => namespace, do not call directly
* - .responsive => #hl.img.responsive();
* - .framed => #hl.img.framed();
* ---------------------------------------
* USER INTERFACE
* ---------------------------------------
* - .ui => namespace, do not call directly
* - .themes => namespace, do not call directly
* - .light => #hl.ui.themes.light(); - call within <body> element
* - .dark => #hl.ui.themes.dark(); - call within <body> element
* - .list => namespace, do not call directly
* - .subtle => #hl.list.subtle(); - call within <ul> element
* - .horizontal => #hl.list.horizontal(); - call within <ul> element
*/
#hl {
/************************************
* Meyer Reset
* http://meyerweb.com/eric/tools/css/reset/
************************************/
.reset() {
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 license: none(public domain) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }
}
/************************************
* Normalize by necolas
* https://github.com/necolas/normalize.css
************************************/
.normalize() {
/*! normalize.css 2011-08-31T22:02 UTC · http://github.com/necolas/normalize.css */
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}audio:not([controls]){display:none;}
[hidden]{display:none;}
/*
* 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
* http://clagnut.com/blog/348/#c790
* 2. Keeps page centred in all browsers regardless of content height
* 3. Prevents iOS text size adjust after orientation change, without disabling user zoom
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
*/
html {font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
body{margin:0;font-size:13px;line-height:1.231;}/*Added font-size and line-height addition as seen in html5 boilerplate*/
body,button,input,select,textarea{font-family:sans-serif;}
a{color:#00e;}
a:visited{color:#551a8b;}
a:focus{outline:thin dotted;}
a:hover,a:active{outline:0;}
abbr[title]{border-bottom:1px dotted;}
b,strong{font-weight:bold;}
blockquote{margin:1em 40px;}
dfn{font-style:italic;}
mark{background:#ff0;color:#000;}
/*Corrects font family set oddly in IE6, S4/5, Chrome en.wikipedia.org/wiki/User:Davidgothberg/Test59*/
pre,code,kbd,samp{font-family: monospace, serif;_font-family:'courier new',monospace;font-size:1em;}
pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
q{quotes:none;}
q:before,q:after{content:'';content:none;}small{font-size:75%;}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
sup{top:-0.5em;}
sub{bottom:-0.25em;}
ul,ol{margin:1em 0;padding:0 0 0 40px;}
dd{margin:0 0 0 40px;}
nav ul,nav ol{list-style:none;list-style-image:none;margin:0;padding:0;}/*Cleared margin and padding as seen in html5 boilerplate*/
img{border:0;-ms-interpolation-mode:bicubic;}
svg:not(:root){overflow:hidden;}
figure{margin:0;}
form{margin:0;}
fieldset{margin:0 2px;padding:0.35em 0.625em 0.75em;}
legend{border:0;*margin-left:-7px;}
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
button,input {line-height: normal;*overflow:visible;}
table button,table input{*overflow:auto;}
button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing: content-box;}
input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
button::-moz-focus-inner,input::-moz-focus-inner {border:0;padding:0;}
textarea {overflow:auto;vertical-align:top;}
table {border-collapse:collapse;border-spacing:0;}
}
/************************************
* Clearfix
*
* what?: Contains floats, for more info see h5bp.com/q.
* Removes the need to add .clearfix as a class
* to your elements.
*
************************************/
.clearfix() {
&:before { content: ''; display: block; }
&:after { content: ''; display: table; clear: both; }
zoom: 1;
}
/************************************
* Centered
*
* @what?: Center your object with an
* automatic margin
*
* @params: width, default = 960px
*
************************************/
.centered(@width: 960px) {
width: @width;
margin: 0 auto;
}
/************************************
* Border
*
* @what?: Add a 1px solid border
* super quick.
*
* @params: colour, default = #000
*
************************************/
.border(@colour: #000) {
border: 1px solid @colour;
}
/************************************
* Opacity
*
* @what?: Add opacity to an HTML element that works
* in all browsers including ie6+
*
* @params: value, default = .5
*
************************************/
.opacity(@value: .5) {
opacity: @value;
filter: ~'alpha(opacity=(@value*100))';
filter: ~'progid:DXImageTransform.Microsoft.Alpha(opacity=(@value*100))';
-ms-filter: ~'"progid:DXImageTransform.Microsoft.Alpha(opacity=(@value*100))"';
}
/************************************
* Round all corners
*
* @what?: Rounds every corner equally
*
* @params: radius, default = 5px
*
************************************/
.round-all-corners(@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
/************************************
* Rounded corners
*
* @what?: Round each corner individually
*
* @params: topLeft, default = 5px
* topRight, default = 5px
* bottomRight, default = 5px
* bottomLeft, default = 5px
*
************************************/
.rounded-corners(@topLeft: 5px, @topRight: 5px, @bottomRight: 5px, @bottomLeft: 5px) {
-moz-border-radius-topleft: @topLeft;
-moz-border-radius-topright: @topRight;
-moz-border-radius-bottomright: @bottomRight;
-moz-border-radius-bottomleft: @bottomLeft;
-webkit-border-radius: @topLeft @topRight @bottomRight @bottomLeft;
border-radius: @topLeft @topRight @bottomRight @bottomLeft;
}
/************************************
* Transition
*
* @what?: Defines a CSS3 transition
*
* @params: property, default = all
* duration, default = .5s
* ease, default = linear
* delay, default = .0s
*
************************************/
.transition(@property: all, @duration: .5s, @ease: linear, @delay: .0s) {
-webkit-transition: @arguments;
-moz-transition: @arguments;
-o-transition: @arguments;
transition: @arguments;
}
/************************************
* Drop shadow
*
* @what?: Adds an outer shadow to the
* html element. To add a shadow
* to text use #hl.text-shadow(...)
*
* @params: x, default = 0px
* y, default = 1px
* blur, default = 1px
* colour, default = rgba(0, 0, 0, .6)
*
************************************/
.drop-shadow(@x: 0px, @y: 1px, @blur: 1px, @colour: rgba(0, 0, 0, .6)) {
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
box-shadow: @arguments;
}
/************************************
* Inner shadow
*
* @what: Adds an inner shadow to the
* html element.
*
* @params: x, default = 0px
* y, default = 1px
* blur, default = 1px
* colour, default = rgba(0, 0, 0, .6)
*
************************************/
.inner-shadow(@x: 0px, @y: 1px, @blur: 1px, @colour: rgba(0, 0, 0, .6)) {
-webkit-box-shadow: inset @arguments;
-moz-box-shadow: inset @arguments;
box-shadow: inset @arguments;
}
/************************************
* Text shadow
*
* @what?: Adds an outer shadow to text
*
* @params: x, default = 1px
* y, default = 1px
* blur, default = 1px
* colour, default = rgba(0, 0, 0, .6)
*
************************************/
.text-shadow(@x: 1px, @y: 1px, @blur: 1px, @colour: rgba(0, 0, 0, .6)) {
text-shadow: @arguments;
}
/************************************
* Background Gradient
*
* @what?: Adds a background gradient to
* an HTML element
*
* @params: colourFrom, default = #bbb
* colourTo, default = #f1f1f1
* fallbackColour, default = #f1f1f1
* fallbackImageUrl, default = ''
*
************************************/
.background-gradient(@colourfrom: #bbb, @colourTo: #f1f1f1, @fallbackColour: #f1f1f1, @fallbackImageUrl: '') {
background-color: @fallbackColour;
background-image: url("@fallbackImage");
background-repeat: no-repeat;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(@colourfrom), to(@colourTo));
background-image: -webkit-linear-gradient(bottom, @colourfrom, @colourTo);
background-image: -moz-linear-gradient(bottom, @colourfrom, @colourTo);
background-image: -ms-linear-gradient(bottom, @colourfrom, @colourTo);
background-image: -o-linear-gradient(bottom, @colourfrom, @colourTo);
/* For Internet Explorer 5.5 - 7 */
filter: ~'progid:DXImageTransform.Microsoft.gradient(startColorstr=@colourfrom, endColorstr=@colourTo)';
/* For Internet Explorer 8 and newer */
-ms-filter: ~'"progid:DXImageTransform.Microsoft.gradient(startColorstr=@colourfrom, endColorstr=@colourTo)"';
}
/************************************
* Scale
*
* @what?: Defines a 2D scale transformation
*
* @params: amount, default = 1
*
************************************/
.scale(@amount: 1) {
transform:scale(@amount);
-ms-transform:scale(@amount);
-moz-transform:scale(@amount);
-webkit-transform:scale(@amount);
-o-transform:scale(@amount);
}
/************************************
* ScaleX
*
* @what?: Defines a scale transformation
* by giving a value for the X-axis
*
* @params: x, default = 1
*
************************************/
.scaleX(@x: 1) {
transform:scaleX(@x);
-ms-transform:scaleX(@x);
-moz-transform:scaleX(@x);
-webkit-transform:scaleX(@x);
-o-transform:scaleX(@x);
}
/************************************
* ScaleY
*
* @what?: Defines a scale transformation
* by giving a value for the Y-axis
*
* @params: y, default = 1
*
************************************/
.scaleY(@y: 1) {
transform:scaleY(@y);
-ms-transform:scaleY(@y);
-moz-transform:scaleY(@y);
-webkit-transform:scaleY(@y);
-o-transform:scaleY(@y);
}
/************************************
* Rotate
*
* @what?: Defines a 2D rotation, the angle
* is specified in the parameter
*
* @params: degrees, default = 90deg
*
************************************/
.rotate(@degrees: 90deg) {
transform:rotate(@degrees);
-ms-transform:rotate(@degrees);
-moz-transform:rotate(@degrees);
-webkit-transform:rotate(@degrees);
-o-transform:rotate(@degrees);
}
/************************************
* RotateX
*
* @what?: Defines a 3D rotation along the X-axis
*
* @params: degrees, default = 90deg
*
************************************/
.rotateX(@degrees: 90deg) {
transform:rotateX(@degrees);
-ms-transform:rotateX(@degrees);
-moz-transform:rotateX(@degrees);
-webkit-transform:rotateX(@degrees);
-o-transform:rotateX(@degrees);
}
/************************************
* RotateY
*
* @what?: Defines a 3D rotation along the Y-axis
*
* @params: degrees, default = 90deg
*
************************************/
.rotateY(@degrees: 90deg) {
transform:rotateY(@degrees);
-ms-transform:rotateY(@degrees);
-moz-transform:rotateY(@degrees);
-webkit-transform:rotateY(@degrees);
-o-transform:rotateY(@degrees);
}
/************************************
* Skew
*
* @what?: Defines a 2D skew transformation
* along the X- and the Y-axis
*
* @params: angleX, default = 10deg
* angleY, default = 10deg
*
************************************/
.skew(@angleX: 10deg, @angleY: 10deg) {
transform:skew(@angleX, @angleY);
-ms-transform:skew(@angleX, @angleY);
-moz-transform:skew(@angleX, @angleY);
-webkit-transform:skew(@angleX, @angleY);
-o-transform:skew(@angleX, @angleY);
}
/************************************
* SkewX
*
* @what?: Defines a 2D skew transformation
* along the X-axis
*
* @params: angleX, default = 10deg
*
************************************/
.skewX(@angleX: 10deg) {
transform:skewX(@angleX);
-ms-transform:skewX(@angleX);
-moz-transform:skewX(@angleX);
-webkit-transform:skewX(@angleX);
-o-transform:skewX(@angleX);
}
/************************************
* SkewY
*
* @what?: Defines a 2D skew transformation
* along the Y-axis
*
* @params: angleY, default = 10deg
*
************************************/
.skewY(@angleY: 10deg) {
transform:skewY(@angleY);
-ms-transform:skewY(@angleY);
-moz-transform:skewY(@angleY);
-webkit-transform:skewY(@angleY);
-o-transform:skewY(@angleY);
}
/************************************
* Translate
*
* @what?: Defines a 2D translation
*
* @params: x, default = 10px
* y, default = 10px
*
************************************/
.translate(@x: 10px, @y: 10px) {
transform:translate(@x, @y);
-ms-transform:translate(@x, @y);
-moz-transform:translate(@x, @y);
-webkit-transform:translate(@x, @y);
-o-transform:translate(@x, @y);
}
/************************************
* TranslateX
*
* @what?: Defines a translation, using
* only the value for the X-axis
*
* @params: x, default = 10px
*
************************************/
.translateX(@x: 0px) {
transform:translateX(@x);
-ms-transform:translateX(@x);
-moz-transform:translateX(@x);
-webkit-transform:translateX(@x);
-o-transform:translateX(@x);
}
/************************************
* TranslateY
*
* @what?: Defines a translation, using
* only the value for the Y-axis
*
* @params: y, default = 10px
*
************************************/
.translateY(@y: 0px) {
transform:translateY(@y);
-ms-transform:translateY(@y);
-moz-transform:translateY(@y);
-webkit-transform:translateY(@y);
-o-transform:translateY(@y);
}
/************************************
* Matrix
*
* @what?: Defines a 2D transformation,
* using a matrix of six values
*
* @params: n1, default = 0
* n2, default = 0
* n3, default = 0
* n4, default = 0
* n5, default = 0
* n6, default = 0
*
************************************/
.matrix(@n1: 0, @n2: 0, @n3: 0, @n4: 0, @n5: 0, @n6: 0) {
transform:matrix(@n1, @n2, @n3, @n4, @n5, @n6);
-ms-transform:matrix(@n1, @n2, @n3, @n4, @n5, @n6);
-moz-transform:matrix(@n1, @n2, @n3, @n4, @n5, @n6);
-webkit-transform:matrix(@n1, @n2, @n3, @n4, @n5, @n6);
-o-transform:matrix(@n1, @n2, @n3, @n4, @n5, @n6);
}
/************************************
* Grid
************************************/
.grid {
/************************************
* Make
*
* @what?: Defines the base variables needed
* for the HelpLess grid system.
*
* @params: @width, default = 960
* @colnum, default = 16
* @colgutter, default = 10
*
************************************/
.make(@width: 960, @colnum: 16, @colgutter: 10) {
width: 0px + @width;
@col-width: 100% / @colnum;
@col-gutter-percent: 0% + ((@colgutter / @width) * 100);
}
/************************************
* 1200
*
* @what?: Predefined grid maker
*
************************************/
.1200() {
.make(1200);
}
/************************************
* 1120
*
* @what?: Predefined grid maker
*
************************************/
.1120() {
.make(1120);
}
/************************************
* 1040
*
* @what?: Predefined grid maker
*
************************************/
.1040() {
.make(1040);
}
/************************************
* 960
*
* @what?: Predefined grid maker
*
************************************/
.960() {
.make(960);
}
/************************************
* 880
*
* @what?: Predefined grid maker
*
************************************/
.880() {
.make(880);
}
/************************************
* 800
*
* @what?: Predefined grid maker
*
************************************/
.800() {
.make(800);
}
/************************************
* 720
*
* @what?: Predefined grid maker
*
************************************/
.720() {
.make(720);
}
/************************************
* 640
*
* @what?: Predefined grid maker
*
************************************/
.640() {
.make(640);
}
/************************************
* 560
*
* @what?: Predefined grid maker
*
************************************/
.560() {
.make(560);
}
/************************************
* 480
*
* @what?: Predefined grid maker
*
************************************/
.480() {
.make(480);
}
/************************************
* 400
*
* @what?: Predefined grid maker
*
************************************/
.400() {
.make(400);
}
/************************************
* 320
*
* @what?: Predefined grid maker
*
************************************/
.320() {
.make(320);
}
/************************************
* 240
*
* @what?: Predefined grid maker
*
************************************/
.240() {
.make(240);
}
/************************************
* Row
*
* @what?: Defines an element as a row.
* clears all clearfixes all columns
* directly inside.
*
************************************/
.row() {
.clearfix();
display: block;
width: 100%;
overflow-y: visible;
margin-left: -(@col-gutter-percent / 2);
}
/************************************
* Col
*
* @what?: Defines an element as a column.
* Sets the width depending on the
* supplied arguments and the width
* set in .grid()
*
* @params: @colSpan, default = 1
*
************************************/
.col(@colSpan: 1) {
float: left;
display: block;
min-width: @col-width * @colSpan;
padding: 0 0 0 @col-gutter-percent !important;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
}
/***********************************
* TYPOGRAPHY
***********************************/
.typo {
/************************************
* Serif
*
* @what?: Quickly set your font family
* as a serif set
*
* @params: @webfont, default = none
*
************************************/
.serif(@webfont) {
font-family: @webfont, georgia, times, serif;
}
/************************************
* Serif
*
* @what?: Quickly set your font family
*
* @params: @webfont, default = none
*
************************************/
.sans(@webfont) {
font-family: @webfont, "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
/************************************
* Columns
*
* @what?: Sets CSS3 columns within
* block of html text
*
* @params: count, default = 1
* gap, default = 10px
*
************************************/
.columns(@count: 1, @gap: 10px) {
-moz-column-count: @count;
-moz-column-gap: @gap;
-webkit-column-count: @count;
-webkit-column-gap: @gap;
column-count: @count;
column-gap: @gap;
}
}
/***********************************
* IMAGE
***********************************/
.img {
/************************************
* Responsive
*
* @what?: Set image max-width: 100%
*
************************************/
.responsive() {
max-width: 100%;
}
/************************************
* Framed
*
* @what?: Add a quick 10px frame to your image
*
************************************/
.framed() {
border: 1px solid #ccc;
padding: 9px;
.drop-shadow();
outline: none;
}
}
/***********************************
* UI
***********************************/
.ui {
/***********************************
* PREDEFINED THEMES
***********************************/
.themes {
/***********************************
* Theme: Light
*
* @what?: Quickly style the base elements
* of your page
*
***********************************/
.light() {
background-color: #fff;
color: #555;
.text-shadow(1px, 1px, 1px, #fff);
}
/***********************************
* Theme: Dark
*
* @what?: Quickly style the base elements
* of your page
*
***********************************/
.dark() {
background-color: #333;
color: #ccc;
.text-shadow(1px, 1px, 1px, #333);
}
}
/***********************************
* LISTS
***********************************/
.list {
/***********************************
* Subtle
*
* @what?: Quickly removes the styling
* from a list
*
***********************************/
.subtle() {
list-style: none;
margin: 0;
padding: 0;
}
/***********************************
* Horizontal
*
* @what?: Creates a horizontal list,
* useful for styling your site nav
*
***********************************/
.horizontal(@itemSpacing: 10px) {
.subtle();
.clearfix();
li {
float: left;
display: block;
margin-right: @itemSpacing;
}
}
}
}
}