-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.txt
56 lines (40 loc) · 957 Bytes
/
README.txt
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
responsive.less
Author: Paul Mist
Twitter: @paulmist
EXAMPLE USAGE
-------------
--- Import to your .less styles ---
@import 'responsive.less';
--- .width() ---
Convert px based width to %
where 480px is our desired element width
and 960px is the context in which it
sits, or it parent's width -
#div{
.width(960, 480);
}
--- .padding() ---
Convert px based padding to %
where 10px (the usual 'top right bottom left' order applies)
is our desired element's padding
and 480px is the element width
#div{
.padding(480, 10, 10, 10, 10);
}
Individual properties are also available e.g.
#div{
.padding-left(480, 10);
}
--- .margin() ---
Convert px based margin to %
where 10px (the usual 'top right bottom left' order applies)
is our desired element's margin
and 480px is the context in which it
sits, or it parent's width -
#div{
.margin(480, 10, 10, 10, 10);
}
Individual properties are also available e.g.
#div{
.margin-left(480, 10);
}