Normalize

Amaze UI Touch 使用 normalize.css v4.1.1 作为基础样式,部分细节做了微调。

  1. // Amaze UI Mobile normalize based on normalize.css
  2. /* normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
  3. /**
  4. * 1. Change the default font family in all browsers (opinionated).
  5. * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
  6. */
  7. html {
  8. font-family: sans-serif; /* 1 */
  9. -ms-text-size-adjust: 100%; /* 2 */
  10. -webkit-text-size-adjust: 100%; /* 2 */
  11. }
  12. /**
  13. * Remove the margin in all browsers (opinionated).
  14. */
  15. body {
  16. margin: 0;
  17. }
  18. /* HTML5 display definitions
  19. ========================================================================== */
  20. /**
  21. * Add the correct display in IE 9-.
  22. * 1. Add the correct display in Edge, IE, and Firefox.
  23. * 2. Add the correct display in IE.
  24. */
  25. article,
  26. aside,
  27. details, /* 1 */
  28. figcaption,
  29. figure,
  30. footer,
  31. header,
  32. main, /* 2 */
  33. menu,
  34. nav,
  35. section,
  36. summary { /* 1 */
  37. display: block;
  38. }
  39. /**
  40. * Add the correct display in IE 9-.
  41. */
  42. audio,
  43. canvas,
  44. progress,
  45. video {
  46. display: inline-block;
  47. }
  48. /**
  49. * Add the correct display in iOS 4-7.
  50. */
  51. audio:not([controls]) {
  52. display: none;
  53. height: 0;
  54. }
  55. /**
  56. * Add the correct vertical alignment in Chrome, Firefox, and Opera.
  57. */
  58. progress {
  59. vertical-align: baseline;
  60. }
  61. /**
  62. * Add the correct display in IE 10-.
  63. * 1. Add the correct display in IE.
  64. */
  65. template, /* 1 */
  66. [hidden] {
  67. display: none;
  68. }
  69. /* Links
  70. ========================================================================== */
  71. /**
  72. * 1. Remove the gray background on active links in IE 10.
  73. * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
  74. */
  75. a {
  76. background-color: transparent; /* 1 */
  77. -webkit-text-decoration-skip: objects; /* 2 */
  78. }
  79. /**
  80. * Remove the outline on focused links when they are also active or hovered
  81. * in all browsers (opinionated).
  82. */
  83. a:active,
  84. a:hover {
  85. outline-width: 0;
  86. }
  87. /* Text-level semantics
  88. ========================================================================== */
  89. /**
  90. * 1. Remove the bottom border in Firefox 39-.
  91. * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
  92. */
  93. abbr[title] {
  94. border-bottom: none; /* 1 */
  95. text-decoration: underline; /* 2 */
  96. text-decoration: underline dotted; /* 2 */
  97. }
  98. /**
  99. * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
  100. */
  101. b,
  102. strong {
  103. font-weight: inherit;
  104. }
  105. /**
  106. * Add the correct font weight in Chrome, Edge, and Safari.
  107. */
  108. b,
  109. strong {
  110. font-weight: bolder;
  111. }
  112. /**
  113. * Add the correct font style in Android 4.3-.
  114. */
  115. dfn {
  116. font-style: italic;
  117. }
  118. /**
  119. * Correct the font size and margin on `h1` elements within `section` and
  120. * `article` contexts in Chrome, Firefox, and Safari.
  121. */
  122. h1 {
  123. font-size: 2em;
  124. margin: 0.67em 0;
  125. }
  126. /**
  127. * Add the correct background and color in IE 9-.
  128. */
  129. mark {
  130. background-color: #ff0;
  131. color: #000;
  132. }
  133. /**
  134. * Add the correct font size in all browsers.
  135. */
  136. small {
  137. font-size: 80%;
  138. }
  139. /**
  140. * Prevent `sub` and `sup` elements from affecting the line height in
  141. * all browsers.
  142. */
  143. sub,
  144. sup {
  145. font-size: 75%;
  146. line-height: 0;
  147. position: relative;
  148. vertical-align: baseline;
  149. }
  150. sub {
  151. bottom: -0.25em;
  152. }
  153. sup {
  154. top: -0.5em;
  155. }
  156. /* Embedded content
  157. ========================================================================== */
  158. /**
  159. * Remove the border on images inside links in IE 10-.
  160. */
  161. img {
  162. border-style: none;
  163. }
  164. /**
  165. * Hide the overflow in IE.
  166. */
  167. svg:not(:root) {
  168. overflow: hidden;
  169. }
  170. /* Grouping content
  171. ========================================================================== */
  172. /**
  173. * 1. Correct the inheritance and scaling of font size in all browsers.
  174. * 2. Correct the odd `em` font sizing in all browsers.
  175. */
  176. code,
  177. kbd,
  178. pre,
  179. samp {
  180. font-family: monospace, monospace; /* 1 */
  181. font-size: 1em; /* 2 */
  182. }
  183. /**
  184. * Add the correct margin in IE 8.
  185. */
  186. figure {
  187. margin: 1em 40px;
  188. }
  189. /**
  190. * 1. Add the correct box sizing in Firefox.
  191. * 2. Show the overflow in Edge and IE.
  192. */
  193. hr {
  194. box-sizing: content-box; /* 1 */
  195. height: 0; /* 1 */
  196. overflow: visible; /* 2 */
  197. }
  198. /* Forms
  199. ========================================================================== */
  200. /**
  201. * 1. Change font properties to `inherit` in all browsers (opinionated).
  202. * 2. Remove the margin in Firefox and Safari.
  203. */
  204. button,
  205. input,
  206. optgroup,
  207. select,
  208. textarea {
  209. // font: inherit; /* 1 */
  210. margin: 0; /* 2 */
  211. }
  212. /**
  213. * Restore the font weight unset by the previous rule.
  214. */
  215. optgroup {
  216. font-weight: bold;
  217. }
  218. /**
  219. * Show the overflow in IE.
  220. * 1. Show the overflow in Edge.
  221. */
  222. button,
  223. input { /* 1 */
  224. overflow: visible;
  225. }
  226. /**
  227. * Remove the inheritance of text transform in Edge, Firefox, and IE.
  228. * 1. Remove the inheritance of text transform in Firefox.
  229. */
  230. button,
  231. select { /* 1 */
  232. text-transform: none;
  233. }
  234. /**
  235. * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
  236. * controls in Android 4.
  237. * 2. Correct the inability to style clickable types in iOS and Safari.
  238. */
  239. button,
  240. html [type="button"], /* 1 */
  241. [type="reset"],
  242. [type="submit"] {
  243. -webkit-appearance: button; /* 2 */
  244. cursor: pointer; /* 3 */
  245. }
  246. /**
  247. * Re-set default cursor for disabled elements.
  248. */
  249. button[disabled],
  250. html input[disabled] {
  251. cursor: default;
  252. }
  253. /**
  254. * Remove the inner border and padding in Firefox.
  255. */
  256. button::-moz-focus-inner,
  257. [type="button"]::-moz-focus-inner,
  258. [type="reset"]::-moz-focus-inner,
  259. [type="submit"]::-moz-focus-inner {
  260. border-style: none;
  261. padding: 0;
  262. }
  263. /**
  264. * Restore the focus styles unset by the previous rule.
  265. */
  266. button:-moz-focusring,
  267. [type="button"]:-moz-focusring,
  268. [type="reset"]:-moz-focusring,
  269. [type="submit"]:-moz-focusring {
  270. outline: 1px dotted ButtonText;
  271. }
  272. /**
  273. * Change the border, margin, and padding in all browsers (opinionated).
  274. */
  275. fieldset {
  276. border: 1px solid #c0c0c0;
  277. margin: 0 2px;
  278. padding: 0.35em 0.625em 0.75em;
  279. }
  280. /**
  281. * 1. Correct the text wrapping in Edge and IE.
  282. * 2. Correct the color inheritance from `fieldset` elements in IE.
  283. * 3. Remove the padding so developers are not caught out when they zero out
  284. * `fieldset` elements in all browsers.
  285. */
  286. legend {
  287. box-sizing: border-box; /* 1 */
  288. color: inherit; /* 2 */
  289. display: table; /* 1 */
  290. max-width: 100%; /* 1 */
  291. padding: 0; /* 3 */
  292. white-space: normal; /* 1 */
  293. }
  294. input {
  295. line-height: normal;
  296. }
  297. /**
  298. * Remove the default vertical scrollbar in IE.
  299. */
  300. textarea {
  301. overflow: auto;
  302. }
  303. /**
  304. * 1. Add the correct box sizing in IE 10-.
  305. * 2. Remove the padding in IE 10-.
  306. */
  307. [type="checkbox"],
  308. [type="radio"] {
  309. box-sizing: border-box; /* 1 */
  310. padding: 0; /* 2 */
  311. }
  312. /**
  313. * Correct the cursor style of increment and decrement buttons in Chrome.
  314. */
  315. [type="number"]::-webkit-inner-spin-button,
  316. [type="number"]::-webkit-outer-spin-button {
  317. height: auto;
  318. }
  319. /**
  320. * 1. Correct the odd appearance in Chrome and Safari.
  321. * 2. Correct the outline style in Safari.
  322. */
  323. [type="search"] {
  324. -webkit-appearance: textfield; /* 1 */
  325. outline-offset: -2px; /* 2 */
  326. }
  327. /**
  328. * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
  329. */
  330. [type="search"]::-webkit-search-cancel-button,
  331. [type="search"]::-webkit-search-decoration {
  332. -webkit-appearance: none;
  333. }
  334. /**
  335. * Correct the text style of placeholders in Chrome, Edge, and Safari.
  336. */
  337. ::-webkit-input-placeholder {
  338. color: inherit;
  339. opacity: 0.54;
  340. }
  341. /**
  342. * 1. Correct the inability to style clickable types in iOS and Safari.
  343. * 2. Change font properties to `inherit` in Safari.
  344. */
  345. ::-webkit-file-upload-button {
  346. -webkit-appearance: button; /* 1 */
  347. font: inherit; /* 2 */
  348. }

Copy

Version: 1.0.0

原文: http://t.amazeui.org/#/docs/normalize