-
Notifications
You must be signed in to change notification settings - Fork 0
/
_text-columns.less
107 lines (97 loc) · 3.53 KB
/
_text-columns.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
/**
* less css: TEXT COLUMNS
*
* @section lesscss-mixins
* @subsection text-columns
* @author Jasper Moelker <[email protected]>
*/
/**
* A shorthand property for setting column-width and column-count.
* @method .textColumns
* @param {Number|String} width expects "auto" or a length that specifies the width of the columns
* @param {number} count the number of columns
* @return cross browser text columns rule
*/
.textColumns(@width, @count){
-webkit-columns: @width @count; /* Safari and Chrome */
-moz-columns: @width @count; /* Firefox */
columns: @width @count;
}
/**
* Specifies the width of the columns.
* @method .textColumnWidth
* @param {Number|String} width expects "auto" or a length that specifies the width of the columns
* @return cross browser column width
*/
.textColumnWidth(@width){
-webkit-column-width: @width; /* Safari and Chrome */
-moz-column-width: @width; /* Firefox */
column-width: @width;
}
/**
* Specifies the number of columns an element should be divided into.
* @method .textColumnWidth
* @param {number} count the number of columns
* @return cross browser column count
*/
.textColumnCount(@count){
-webkit-column-count: @count; /* Safari and Chrome */
-moz-column-count: @count; /* Firefox */
column-count: @count;
}
/**
* @method .textColumnGap
* @param {Number|String} gap expects "normal" or a specified length that will set the gap between the columns
* @return cross browser column gap
*/
.textColumnGap(@gap){
-webkit-column-gap: @gap; /* Safari and Chrome */
-moz-column-gap: @gap; /* Firefox */
column-gap: @gap;
}
/**
* Specifies the style of the rule between columns.
* @method .textColumnRule
* @param {Number|String} width expects "auto" or a length that specifies the width of each column
* @param {String} style expects none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset, defaults to outset
* @param {String} color hexidecimal value or color alias, defaults to white
* @return cross browser column rule
*/
.textColumnRule(@width, @style:outset, @color:white){
-webkit-column-rule: @width @style @color; /* Safari and Chrome */
-moz-column-rule: @width @style @color; /* Firefox */
column-rule: @width @style @color;
}
/**
* Specifies the width of the rule between columns.
* @method .textColumnRuleWidth
* @param {Number|String} width expects "auto" or a length that specifies the width of each column
* @return cross browser column rule width
*/
.textColumnRuleWidth(@width){
-webkit-column-rule-width: @width; /* Safari and Chrome */
-moz-column-rule-width: @width; /* Firefox */
column-rule-width: @width;
}
/**
* Specifies the style of the rule between columns.
* @method .textColumnRuleStyle
* @param {String} style expects none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset, defaults to outset
* @return cross browser column rule style
*/
.textColumnRuleStyle(@style){
-webkit-column-rule-style: @style; /* Safari and Chrome */
-moz-column-rule-style: @style; /* Firefox */
column-rule-style: @style;
}
/**
* Specifies the color of the rule between columns.
* @method .textColumnRuleColor
* @param {String} color hexidecimal value or color alias
* @return cross browser column rule color
*/
.textColumnRuleColor(@color){
-webkit-column-rule-color: @color; /* Safari and Chrome */
-moz-column-rule=color: @color; /* Firefox */
column-rule-color: @color;
}