You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reset.less 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. @import "var";
  2. * {
  3. padding: 0;
  4. margin: 0;
  5. }
  6. html {
  7. font-size: @baseFontSize+1;
  8. font-family: Helvetica, "Microsoft Yahei", Menlo, Monaco, Consolas, "Courier New", monospace;
  9. // make sure min font size
  10. -ms-text-size-adjust: 100%;
  11. -webkit-text-size-adjust: 100%;
  12. line-height: @baseLineHeight;
  13. color: @baseFontColor;
  14. background-color: @baseBgColor;
  15. }
  16. input,
  17. textarea,
  18. select,
  19. option,
  20. button {
  21. font-family: Helvetica, "Microsoft Yahei", Menlo, Monaco, Consolas, "Courier New", monospace;
  22. }
  23. // html5 block elements
  24. article,
  25. aside,
  26. details,
  27. figcaption,
  28. figure,
  29. footer,
  30. header,
  31. main,
  32. nav,
  33. section,
  34. summary,
  35. .block {
  36. display: block;
  37. }
  38. .inline {
  39. display: inline;
  40. }
  41. .inline-block {
  42. display: inline-block;
  43. }
  44. .dis-table {
  45. display: table;
  46. }
  47. .dis-table-cell {
  48. display: table-cell;
  49. }
  50. .dis-flex {
  51. display: flex;
  52. }
  53. // html5 media elements
  54. audio,
  55. canvas,
  56. progress,
  57. video {
  58. display: inline-block;
  59. vertical-align: baseline;
  60. }
  61. audio:not([controls]) {
  62. display: none;
  63. height: 0;
  64. }
  65. // display hidden elements
  66. [hidden],
  67. template,
  68. .hidden {
  69. display: none;
  70. }
  71. .opacity {
  72. opacity: 0;
  73. }
  74. .opacity-half {
  75. opacity: .5;
  76. }
  77. // links element
  78. a,
  79. .text-link {
  80. color: @linkColor;
  81. text-decoration: none;
  82. cursor: pointer;
  83. &:hover {
  84. color: @linkHoverColor;
  85. text-decoration: none;
  86. }
  87. &:focus {
  88. outline: none;
  89. }
  90. }
  91. // stylus elements
  92. b,
  93. strong,
  94. .text-bold {
  95. font-weight: bold;
  96. }
  97. dfn,
  98. .text-italic {
  99. font-style: italic;
  100. }
  101. // headers elements
  102. h1,
  103. .text-h1 {
  104. font-size: 2em;
  105. margin-bottom: 0.67em;
  106. }
  107. h2,
  108. .text-h2 {
  109. font-size: 1.6em;
  110. margin-bottom: 0.625em;
  111. }
  112. h3,
  113. .text-h3 {
  114. font: 1.2em;
  115. margin-bottom: 0.5em;
  116. }
  117. h4,
  118. h5,
  119. h6,
  120. .text-h4,
  121. .text-h5,
  122. .text-h6 {
  123. font-size: 1em;
  124. margin-bottom: .3em;
  125. }
  126. // text elements
  127. small,
  128. .text-small {
  129. font-size: .8em;
  130. }
  131. sub,
  132. sup,
  133. .text-sup,
  134. .text-sub {
  135. font-size: .7em;
  136. line-height: 0;
  137. position: relative;
  138. vertical-align: baseline;
  139. }
  140. sup,
  141. .text-sup {
  142. top: -0.5em;
  143. }
  144. sub,
  145. .text-sub {
  146. bottom: -0.25em;
  147. }
  148. .figure,
  149. .blockquote {
  150. margin: 1em 1.5em;
  151. }
  152. pre {
  153. overflow: auto;
  154. margin: 0;
  155. padding: .4em 1em;
  156. }
  157. code,
  158. kbd,
  159. pre,
  160. samp {
  161. font: 14px Consolas, "Liberation Mono", Menlo, Courier, monospace;
  162. }
  163. .text-left {
  164. text-align: left;
  165. }
  166. .text-right {
  167. text-align: right;
  168. }
  169. .text-center {
  170. text-align: center;
  171. }
  172. .list-no-style {
  173. list-style: none;
  174. }
  175. // image elements
  176. img {
  177. border: none;
  178. }
  179. svg:not(:root) {
  180. overflow: hidden;
  181. }
  182. // form elements
  183. label {
  184. font-weight: bold;
  185. }
  186. textarea,
  187. input,
  188. .ipt {
  189. padding: .6em;
  190. line-height: normal;
  191. border: 1px solid @iptBorderColor;
  192. &:focus {
  193. background-color: @iptFocusColor;
  194. outline: none;
  195. }
  196. }
  197. button {
  198. overflow: visible;
  199. padding: .6em 1.2em;
  200. }
  201. button,
  202. select {
  203. text-transform: none;
  204. &:focus {
  205. outline: none;
  206. }
  207. }
  208. button,
  209. input[type="button"],
  210. input[type="reset"],
  211. input[type="submit"] {
  212. -webkit-appearance: button;
  213. -moz-appearance: button;
  214. cursor: pointer;
  215. background-color: @btnBgColor;
  216. color: @btnFontColor;
  217. border: none;
  218. &:hover {
  219. background-color: @btnHoverBgColor;
  220. color: @btnHoverFontColor;
  221. }
  222. }
  223. button[disabled],
  224. html input[disabled] {
  225. cursor: default;
  226. }
  227. button::-moz-focus-inner,
  228. input::-moz-focus-inner {
  229. border: 0;
  230. padding: 0;
  231. }
  232. input[type="checkbox"],
  233. input[type="radio"] {
  234. box-sizing: border-box;
  235. padding: 0;
  236. }
  237. input[type="search"] {
  238. -webkit-appearance: textfield;
  239. -moz-appearance: textfield;
  240. -moz-box-sizing: content-box;
  241. -webkit-box-sizing: content-box;
  242. box-sizing: content-box;
  243. }
  244. fieldset {
  245. border: 1px solid @iptBorderColor;
  246. margin: 0 2px;
  247. padding: 0.4em 0.8em 0.8em;
  248. }
  249. legend {
  250. border: 0;
  251. padding: 0;
  252. }
  253. textarea {
  254. overflow: auto;
  255. border: 1px solid @iptBorderColor;
  256. padding: .6em;
  257. &:focus {
  258. background-color: @iptFocusColor;
  259. outline: none;
  260. }
  261. }
  262. optgroup {
  263. font-weight: bold;
  264. }
  265. // table elements
  266. table {
  267. background-color: transparent;
  268. border-collapse: collapse;
  269. border-spacing: 0;
  270. }
  271. td,
  272. th {
  273. padding: 0;
  274. }
  275. // hr element
  276. hr {
  277. -moz-box-sizing: content-box;
  278. box-sizing: content-box;
  279. height: 0;
  280. border: none;
  281. border-bottom: 1px solid @hrColor;
  282. margin-bottom: .75em;
  283. }
  284. // radius element
  285. .radius {
  286. border-radius: .25em;
  287. }
  288. // truncate element
  289. .text-truncate {
  290. overflow: hidden;
  291. text-overflow: ellipsis;
  292. white-space: nowrap;
  293. display: inline-block;
  294. vertical-align: top;
  295. }
  296. // code elements
  297. pre {
  298. line-height: 1.6;
  299. overflow: auto;
  300. padding: 0;
  301. }
  302. dt {
  303. font-weight: bold;
  304. }