This repository was archived by the owner on Dec 11, 2021. It is now read-only.
File tree 3 files changed +79
-24
lines changed
3 files changed +79
-24
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* ==========================================================================
3
- * Typography functions
3
+ * Typography mixins
4
4
* ==========================================================================
5
5
*/
6
+ @mixin heading ($style ) {
7
+ font-size : em (map-get ($style ,fontSize ));
8
+ font-weight : map-get ($style ,fontWeight );
9
+ line-height : 1 ;
10
+ text-transform : map-get ($style ,capitalization );
11
+ }
Original file line number Diff line number Diff line change @@ -21,40 +21,27 @@ body {
21
21
}
22
22
23
23
h1 {
24
- font-size : em ( 67px ); // 54px works nicely, as well
25
- font-weight : 700 ;
26
- line-height : 1 ;
24
+ @include heading ($h1 );
27
25
}
28
26
29
27
h2 {
30
- font-size : em ( 36px );
31
- font-weight : 600 ;
32
- line-height : 1 ;
28
+ @include heading ($h2 );
33
29
}
34
30
35
31
h3 {
36
- font-size : em ( 30px );
37
- font-weight : 600 ;
38
- line-height : 1 ;
32
+ @include heading ($h3 );
39
33
}
40
34
41
35
h4 {
42
- font-size : em ( 24px );
43
- font-weight : 600 ;
44
- line-height : 1 ;
36
+ @include heading ($h4 );
45
37
}
46
38
47
39
h5 {
48
- font-size : em ( 20px );
49
- font-weight : 600 ;
50
- line-height : 1 ;
40
+ @include heading ($h5 );
51
41
}
52
42
53
43
h6 {
54
- font-size : em ( 16px );
55
- font-weight : 600 ;
56
- line-height : 1 ;
57
- text-transform : uppercase ; // FIXME Is this opinionated?
44
+ @include heading ($h6 );
58
45
}
59
46
60
47
/*
@@ -78,7 +65,7 @@ blockquote {
78
65
79
66
pre {
80
67
padding : 16px 20px ;
81
- background : #f7f7f7 ; // TODO replace with color variable
68
+ background : map-get ( $pre , background );
82
69
font : normal 12px / 1.4 $monospace ;
83
70
}
84
71
@@ -129,8 +116,8 @@ strong {
129
116
}
130
117
131
118
code {
132
- background : #f2f2f2 ; // TODO replace with color variable
119
+ background : map-get ( $code , background );
133
120
font-size : em ( 16px );
134
121
padding : em ( 4px , 16px ) em ( 8px , 16px );
135
- border-radius : 3 px ; // TODO replace with variable
122
+ border-radius : map-get ( $code , borderRadius );
136
123
}
Original file line number Diff line number Diff line change @@ -82,14 +82,76 @@ chassis.typography = {
82
82
decoration : "none"
83
83
}
84
84
} ,
85
- "hr" : {
85
+ hr : {
86
86
name : "HR style" ,
87
87
value : {
88
88
color : "#999" ,
89
89
thickness : "1px" ,
90
90
style : "solid"
91
91
}
92
+ } ,
93
+ code : {
94
+ name : "code style" ,
95
+ value : {
96
+ background : "#f2f2f2" ,
97
+ borderRadius : "3px"
98
+ }
99
+ } ,
100
+ pre : {
101
+ name : "Pre style" ,
102
+ value : {
103
+ background : "#f7f7f7"
104
+ }
105
+ } ,
106
+ h1 : {
107
+ name : "H1 Style" ,
108
+ value : {
109
+ fontWeight : "700" ,
110
+ fontSize : "67px" ,
111
+ capitalization : "none"
112
+ }
113
+ } ,
114
+ h2 : {
115
+ name : "H2 Style" ,
116
+ value : {
117
+ fontWeight : "600" ,
118
+ fontSize : "36px" ,
119
+ capitalization : "none"
120
+ }
121
+ } ,
122
+ h3 : {
123
+ name : "H3 Style" ,
124
+ value : {
125
+ fontWeight : "600" ,
126
+ fontSize : "30px" ,
127
+ capitalization : "none"
128
+ }
129
+ } ,
130
+ h4 : {
131
+ name : "H4 Style" ,
132
+ value : {
133
+ fontWeight : "600" ,
134
+ fontSize : "24px" ,
135
+ capitalization : "none"
136
+ }
137
+ } ,
138
+ h5 : {
139
+ name : "H5 Style" ,
140
+ value : {
141
+ fontWeight : "600" ,
142
+ fontSize : "20px" ,
143
+ capitalization : "none"
144
+ }
145
+ } ,
146
+ h6 : {
147
+ name : "H6 Style" ,
148
+ value : {
149
+ fontWeight : "600" ,
150
+ fontSize : "16px" ,
151
+ capitalization : "uppercase"
152
+ }
92
153
}
154
+
93
155
} ;
94
156
95
157
return chassis ;
You can’t perform that action at this time.
0 commit comments