-
Notifications
You must be signed in to change notification settings - Fork 0
/
lettuce_wrap_0.3.styl
112 lines (88 loc) · 2.16 KB
/
lettuce_wrap_0.3.styl
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
// Lettuce Wrap – a mobile first flex grid
// Fixing the Box Model
*
-moz-box-sizing border-box
box-sizing border-box
// Grid settings
$grid-max-width = 71.25em
$grid-gutter = 0.625em
$grid-total-columns = 12
$default-body-font-size = 16px
// Responsive breakpoints
$desktop = unquote("only screen and (min-width: 60em)")
$tablet = unquote("only screen and (min-width: 34em)")
$phone = unquote("only screen and (max-width: 34em)")
// Default margin
$baseline = 8px
// Set the body font size
body
font-size $default-body-font-size
// Responsive images
img
max-width 100%
display block
// Flexbox functions
flexbox()
display -webkit-box
display -moz-box
display -ms-flexbox
display -webkit-flex
display flex
flex-flow()
-webkit-flex-flow row wrap
-ms-flex-flow row wrap
flex-flow row wrap
justify-content($justify = flex-start)
-webkit-justify-content $justify
-ms-justify-content $justify
justify-content $justify
align-items($align = flex-start)
-webkit-align-items $align
-ms-align-items $align
align-items $align
flex($flex)
-webkit-box-flex $flex
-moz-box-flex $flex
-ms-flex $flex
-webkit-flex $flex
flex $flex
// The columns mixin
col($columns, $offset = 0)
flex(1 auto)
padding-left $grid-gutter*3
padding-right $grid-gutter*3
@media $tablet
flex(0 (($columns / $grid-total-columns) * 100)%)
padding-left $grid-gutter
padding-right $grid-gutter
@media $desktop
flex(0 (($columns / $grid-total-columns) * 100)%)
padding-left $grid-gutter
padding-right $grid-gutter
if $offset > 0
@media $tablet
margin-left ((($offset / $grid-total-columns) * 100)%)
@media $desktop
margin-left ((($offset / $grid-total-columns) * 100)%)
if $offset == 0
@media $phone
margin-left 0
@media $tablet
margin-left 0
@media $desktop
margin-left 0
// Block elements
background-block()
width 100%
margin 0 auto
content-block($justify = flex-start, $align = flex-start)
flexbox()
flex-flow($align)
justify-content($justify)
align-items()
max-width $grid-max-width
margin 0 auto
.background-block
background-block()
.content-block
content-block()