/
example.scss
120 lines (97 loc) · 1.46 KB
/
example.scss
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
@import "greed";
/* Example site styles */
$black: #1a1a1a;
body {
font: normal 16px sans-serif;
color: $black;
a {
color: $black;
}
}
header {
h1 {
font-size: 3em;
margin: 0;
}
h2 {
margin-top: 0;
color: lightgrey;
}
@media screen and (max-width: 500px) {
text-align: center;
}
}
[role=main] {
@extend %greed-container;
margin: 0 auto;
max-width: 1200px;
}
.fork-me {
border: 0;
font-size: .8em;
position: absolute;
right: 0;
top: 0;
span {
display: none;
}
@media screen and (max-width: 500px) {
display: block;
position: inherit;
text-align: center;
img { display: none; }
span { display: inline; }
}
}
/* Greed styles */
%module {
background-color: grey;
color: white;
font-weight: bold;
margin-bottom: 1em;
padding: 1em;
text-align: center;
}
.fourth,
.third,
.two-thirds,
.half,
.full
{
@extend %module;
}
.fourth {
@include greed(25%);
}
.third {
@include greed(100% / 3);
}
.two-thirds {
@include greed(200% / 3);
}
.half {
@include greed(50%);
}
.full {
@include greed(100%);
}
.responsive {
@media screen and (min-width: 1200px) {
%module {
@include greed(100% / 15);
}
}
@media screen and (max-width: 700px) and (min-width: 500px) {
.fourth {
@include greed(50%);
}
.two-thirds {
@include greed(50%);
}
}
@media screen and (max-width: 500px) {
%module {
@include greed(100%);
}
}
}