1
+ /* *
2
+ * aotu.reset inspired by http://typo.sofi.sh/
3
+ */
4
+
5
+ * , * :before , * :after
6
+ box-sizing : border-box
7
+
1
8
html ,body
9
+ display : block
2
10
height : 100%
3
11
12
+ /* 内外边距通常让各个浏览器样式的表现位置不同 */
4
13
html ,body ,div ,span ,applet ,object ,iframe ,h1 ,h2 ,h3 ,h4 ,h5 ,h6 ,p ,blockquote ,pre ,a ,abbr ,acronym ,address ,big ,cite ,code ,del ,dfn ,em ,img ,ins ,kbd ,q ,s ,samp ,small ,strike ,strong ,sub ,sup ,tt ,var ,dl ,dt ,dd ,ol ,ul ,li ,fieldset ,form ,label ,legend ,table ,caption ,tbody ,tfoot ,thead ,tr ,th ,td
5
14
margin : 0
6
15
padding : 0
@@ -11,25 +20,166 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
11
20
font-size : 100%
12
21
vertical-align : baseline
13
22
14
- ul ,li
23
+ /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
24
+ article , aside , details , figcaption , figure , footer , header , menu , nav , section
25
+ display : block
26
+
27
+ /* HTML5 媒体文件跟 img 保持一致 */
28
+ audio , canvas , video
29
+ display : inline-block
30
+
31
+ /* 要注意表单元素并不继承父级 font 的问题 */
32
+ body , button , input , select , textarea
33
+ font : font-weight font-size / line - height font-family
34
+
35
+ button :: -moz-focus-inner ,
36
+ input :: -moz-focus-inner
37
+ padding : 0
38
+ border : 0
39
+
40
+ /* 去掉各Table cell 的边距并让其边重合 */
41
+ table
42
+ border-collapse : collapse
43
+ border-spacing : 0
44
+
45
+ /* 去除默认边框 */
46
+ fieldset , img
47
+ border : 0
48
+
49
+ /* 块/段落引用 */
50
+ blockquote
51
+ position : relative
52
+ color : color-grey
53
+ font-weight : 400
54
+ border-left : 1px solid color-accent
55
+ padding-left : 1em
56
+ margin : 1em 3em 1em 2em
57
+ & p
58
+ margin-bottom : 0.3em
59
+ & * :last-child
60
+ margin-bottom : 0
61
+
62
+ @media only screen and ( max-width : 640px )
63
+ blockquote
64
+ margin : 1em 0
65
+
66
+ /* Firefox 以外,元素没有下划线,需添加 */
67
+ acronym , abbr
68
+ border-bottom : 1px dotted
69
+ font-variant : normal
70
+
71
+ /* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
72
+ abbr
73
+ cursor : help
74
+
75
+ /* 一致的 del 样式 */
76
+ del
77
+ text-decoration : line-through
78
+
79
+ address , caption , cite , code , dfn , em , th , var
80
+ font-style : normal
81
+ font-weight : 400
82
+
83
+ /* 去掉列表前的标识, li 会继承,大部分网站通常用列表来很多内容,所以应该当去 */
84
+ ul , ol
15
85
list-style : none
16
86
87
+ /* 对齐是排版最重要的因素, 别让什么都居中 */
88
+ caption , th
89
+ text-align : left
90
+
91
+ q :before , q :after
92
+ content : ''
93
+
94
+ /* 统一上标和下标 */
95
+ sub , sup
96
+ font-size : 75%
97
+ line-height : 0
98
+ position : relative
99
+
100
+ :root sub , :root sup
101
+ vertical-align : baseline ; /* for ie9 and other modern browsers */
102
+
103
+ sup
104
+ top : - 0.5em
105
+
106
+ sub
107
+ bottom : - 0.25em
108
+
17
109
body
18
- font : font-size / line - height font-family
19
110
background : #f f f
20
111
color : color-default
21
112
-webkit- font-smoothing : antialiased
22
113
-webkit- text-size-adjust : 100%
114
+ -ms- text-size-adjust : 100% ;
115
+ text-rendering : optimizelegibility
23
116
24
117
a
25
- color : color-default
118
+ color : color-link
26
119
text-decoration : none
27
120
& :hover
28
121
color : color-accent
29
122
30
- sup
31
- vertical-align : super
32
- font-size : smaller
33
-
34
- .container-bg
35
- background : #f f f
123
+ /* 标记,类似于手写的荧光笔的作用 */
124
+ mark
125
+ background : #ff fd d1
126
+ border-bottom : 1px solid #ff ed ce
127
+ padding : 2px
128
+ margin : 0 5px
129
+
130
+ /* 代码片断 */
131
+ pre , code , pre tt
132
+ font-family : font-mono
133
+ word-break : break-all
134
+ pre
135
+ background : bg-block
136
+ border : 1px solid color-border
137
+ padding : 1em 1.5em
138
+ display : block
139
+ -webkit- overflow-scrolling : touch
140
+ code
141
+ background : bg-block
142
+ text-shadow : 0 1px #f f f
143
+ padding : 0 0.3em
144
+
145
+ /* 一致化 horizontal rule */
146
+ hr
147
+ border : none
148
+ border-bottom : 1px solid #cf cf cf
149
+ margin-bottom : 0.8em
150
+ height : 10px
151
+
152
+ /* 底部印刷体、版本等标记 */
153
+ small ,
154
+ /* 图片说明 */
155
+ figcaption
156
+ font-size : 0.9em
157
+ color : color-grey
158
+
159
+ strong , b
160
+ font-weight : bold
161
+ color : color-dark
162
+
163
+ /* 可拖动文件添加拖动手势 */
164
+ [draggable ]
165
+ cursor : move
166
+
167
+ /* clearfix */
168
+ .clearfix
169
+ zoom : 1
170
+ & :before , & :after
171
+ content : ""
172
+ display : table
173
+ & :after
174
+ clear : both
175
+
176
+ /* basic title styles */
177
+ h1 , h2 , h3 , h4 , h5 , h6
178
+ font-weight : font-weight-title
179
+ line-height : line - height-title
180
+ font-family : font-family-title
181
+ color : color-dark
182
+
183
+ /* responsive img */
184
+ img
185
+ max-width : 100%
0 commit comments