-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacegrid.less
30 lines (25 loc) · 905 Bytes
/
acegrid.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
.acegrid-container() {
width: 100%;
overflow: hidden;
}
.acegrid-inner(@padPercent: 3, @cols: 4, @align: "center") {
position: relative;
width: 100% + percentage(@padPercent/100);
left: percentage((-@padPercent/2)/100);
text-align: @align;
line-height: 0px; // removes that weird whitespace under inline-block elements
}
.acegrid-item(@padPercent: 3, @cols: 4) {
position: relative;
display: inline-block;
zoom: 1; // IE7 hack
*display: inline; // IE7 hack
width: (100%/@cols) - percentage(@padPercent/(100+@padPercent));
margin: 0 percentage(@padPercent/(100+@padPercent)/2) percentage(@padPercent/(100+@padPercent)) percentage(@padPercent/(100+@padPercent)/2);
line-height: 120%; // back to (something close to) default
vertical-align: top;
}
.acegrid-item-square(@padPercent: 3, @cols: 4) {
height: 0;
padding-bottom: (100%/@cols) - percentage(@padPercent/(100+@padPercent));;
}