/* I truncated this file. Now it is used mostly in order to reset. */ /* TYPO.CSS - a better way to manage the typography of your Chinese-lang-base site. Copyright (C) 2012 Sofish Lin http://sofish.de Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-rendering: optimizelegibility; } /* 内外边距通常让各个浏览器样式的表现位置不同 */ body, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section { margin: 0; padding: 0; } /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */ article, aside, details, figcaption, figure, footer, header, menu, nav, section { display: block; } /* HTML5 媒体文件跟 img 保持一致 */ audio, canvas, video { display: inline-block; } /* 要注意表单元素并不继承父级 font 的问题 */ body, button, input, select, textarea, .reset-lang { font: 300 1em/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Cambria Math', 'Apple Color Emoji', 'Segoe UI Emoji'; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } /* 去掉各Table cell 的边距并让其边重合 */ table { border-collapse: collapse; border-spacing: 0; } /* 去除默认边框 */ fieldset, img { border: 0; } /* Firefox 以外,元素没有下划线,需添加 */ acronym, abbr, time { border-bottom: 1px dotted; font-variant: normal; text-decoration: none; } /* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */ abbr, time { cursor: help; } /* 一致的 del 样式 */ del { text-decoration: line-through; } address, caption, /*cite,*/ code, dfn, /*em,*/ th, var { font-style: normal; font-weight: 400; } /* 对齐是排版最重要的因素, 别让什么都居中 */ caption, th { text-align: left; } /* 统一上标和下标 */ sub, sup { font-size: 75%; line-height: 0; position: relative; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* 默认不显示下划线,保持页面简洁 */ ins, a { text-decoration: none; } /* 标记,类似于手写的荧光笔的作用 */ mark { padding: 2px 0; } /* 代码片断 */ pre, code, pre tt { font-family: Courier, 'Courier New', monospace; } /* 一致化 horizontal rule */ hr { border: none; border-bottom: 1px solid #cfcfcf; margin-bottom: 0.8em; height: 10px; } strong, b { font-weight: bolder; } /* 标题应该更贴紧内容,并与其他块区分,margin 值要相应做优化 */ h1, h2, h3, h4, h5, h6 { margin-bottom: 0.6em; } /* 同 ul/ol,在文章中应用 table 基本格式 */ table th, table td, table caption { padding: 0.5em 1em; } table caption { border-bottom: none; }