物管理前端
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.

360 lines
6.5 KiB

  1. /*
  2. 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
  3. 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
  4. */
  5. *,
  6. ::before,
  7. ::after {
  8. box-sizing: border-box; /* 1 */
  9. border-width: 0; /* 2 */
  10. border-style: solid; /* 2 */
  11. border-color: #e5e7eb; /* 2 */
  12. }
  13. /*
  14. 1. Use a consistent sensible line-height in all browsers.
  15. 2. Prevent adjustments of font size after orientation changes in iOS.
  16. 3. Use a more readable tab size.
  17. 4. Use the user's configured `sans` font-family by default.
  18. */
  19. html {
  20. line-height: 1.5; /* 1 */
  21. -webkit-text-size-adjust: 100%; /* 2 */
  22. -moz-tab-size: 4; /* 3 */
  23. tab-size: 4; /* 3 */
  24. font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  25. }
  26. /*
  27. 1. Remove the margin in all browsers.
  28. 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
  29. */
  30. body {
  31. margin: 0; /* 1 */
  32. line-height: inherit; /* 2 */
  33. }
  34. /*
  35. 1. Add the correct height in Firefox.
  36. 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
  37. 3. Ensure horizontal rules are visible by default.
  38. */
  39. hr {
  40. height: 0; /* 1 */
  41. color: inherit; /* 2 */
  42. border-top-width: 1px; /* 3 */
  43. }
  44. /*
  45. Add the correct text decoration in Chrome, Edge, and Safari.
  46. */
  47. abbr:where([title]) {
  48. text-decoration: underline dotted;
  49. }
  50. /*
  51. Remove the default font size and weight for headings.
  52. */
  53. h1,
  54. h2,
  55. h3,
  56. h4,
  57. h5,
  58. h6 {
  59. font-size: inherit;
  60. font-weight: inherit;
  61. }
  62. /*
  63. Reset links to optimize for opt-in styling instead of opt-out.
  64. */
  65. a {
  66. color: inherit;
  67. text-decoration: inherit;
  68. }
  69. /*
  70. Add the correct font weight in Edge and Safari.
  71. */
  72. b,
  73. strong {
  74. font-weight: bolder;
  75. }
  76. /*
  77. 1. Use the user's configured `mono` font family by default.
  78. 2. Correct the odd `em` font sizing in all browsers.
  79. */
  80. code,
  81. kbd,
  82. samp,
  83. pre {
  84. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  85. font-size: 1em; /* 2 */
  86. }
  87. /*
  88. Add the correct font size in all browsers.
  89. */
  90. small {
  91. font-size: 80%;
  92. }
  93. /*
  94. Prevent `sub` and `sup` elements from affecting the line height in all browsers.
  95. */
  96. sub,
  97. sup {
  98. font-size: 75%;
  99. line-height: 0;
  100. position: relative;
  101. vertical-align: baseline;
  102. }
  103. sub {
  104. bottom: -0.25em;
  105. }
  106. sup {
  107. top: -0.5em;
  108. }
  109. /*
  110. 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
  111. 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
  112. 3. Remove gaps between table borders by default.
  113. */
  114. table {
  115. text-indent: 0; /* 1 */
  116. border-color: inherit; /* 2 */
  117. border-collapse: collapse; /* 3 */
  118. }
  119. /*
  120. 1. Change the font styles in all browsers.
  121. 2. Remove the margin in Firefox and Safari.
  122. 3. Remove default padding in all browsers.
  123. */
  124. button,
  125. input,
  126. optgroup,
  127. select,
  128. textarea {
  129. font-family: inherit; /* 1 */
  130. font-size: 100%; /* 1 */
  131. font-weight: inherit; /* 1 */
  132. line-height: inherit; /* 1 */
  133. color: inherit; /* 1 */
  134. margin: 0; /* 2 */
  135. padding: 0; /* 3 */
  136. }
  137. /*
  138. Remove the inheritance of text transform in Edge and Firefox.
  139. */
  140. button,
  141. select {
  142. text-transform: none;
  143. }
  144. /*
  145. 1. Correct the inability to style clickable types in iOS and Safari.
  146. 2. Remove default button styles.
  147. */
  148. button,
  149. [type='button'],
  150. [type='reset'],
  151. [type='submit'] {
  152. -webkit-appearance: button; /* 1 */
  153. background-image: none; /* 2 */
  154. }
  155. /*
  156. Use the modern Firefox focus style for all focusable elements.
  157. */
  158. :-moz-focusring {
  159. outline: auto;
  160. }
  161. /*
  162. Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
  163. */
  164. :-moz-ui-invalid {
  165. box-shadow: none;
  166. }
  167. /*
  168. Add the correct vertical alignment in Chrome and Firefox.
  169. */
  170. progress {
  171. vertical-align: baseline;
  172. }
  173. /*
  174. Correct the cursor style of increment and decrement buttons in Safari.
  175. */
  176. ::-webkit-inner-spin-button,
  177. ::-webkit-outer-spin-button {
  178. height: auto;
  179. }
  180. /*
  181. 1. Correct the odd appearance in Chrome and Safari.
  182. 2. Correct the outline style in Safari.
  183. */
  184. [type='search'] {
  185. -webkit-appearance: textfield; /* 1 */
  186. outline-offset: -2px; /* 2 */
  187. }
  188. /*
  189. Remove the inner padding in Chrome and Safari on macOS.
  190. */
  191. ::-webkit-search-decoration {
  192. -webkit-appearance: none;
  193. }
  194. /*
  195. 1. Correct the inability to style clickable types in iOS and Safari.
  196. 2. Change font properties to `inherit` in Safari.
  197. */
  198. ::-webkit-file-upload-button {
  199. -webkit-appearance: button; /* 1 */
  200. font: inherit; /* 2 */
  201. }
  202. /*
  203. Add the correct display in Chrome and Safari.
  204. */
  205. summary {
  206. display: list-item;
  207. }
  208. /*
  209. Removes the default spacing and border for appropriate elements.
  210. */
  211. blockquote,
  212. dl,
  213. dd,
  214. h1,
  215. h2,
  216. h3,
  217. h4,
  218. h5,
  219. h6,
  220. hr,
  221. figure,
  222. p,
  223. pre {
  224. margin: 0;
  225. }
  226. fieldset {
  227. margin: 0;
  228. padding: 0;
  229. }
  230. legend {
  231. padding: 0;
  232. }
  233. ol,
  234. ul,
  235. menu {
  236. list-style: none;
  237. margin: 0;
  238. padding: 0;
  239. }
  240. /*
  241. Prevent resizing textareas horizontally by default.
  242. */
  243. textarea {
  244. resize: vertical;
  245. }
  246. /*
  247. 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
  248. 2. Set the default placeholder color to the user's configured gray 400 color.
  249. */
  250. input::placeholder,
  251. textarea::placeholder {
  252. opacity: 1; /* 1 */
  253. color: #9ca3af; /* 2 */
  254. }
  255. /*
  256. Set the default cursor for buttons.
  257. */
  258. button,
  259. [role="button"] {
  260. cursor: pointer;
  261. }
  262. /*
  263. Make sure disabled buttons don't get the pointer cursor.
  264. */
  265. :disabled {
  266. cursor: default;
  267. }
  268. /*
  269. 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
  270. 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
  271. This can trigger a poorly considered lint error in some tools but is included by design.
  272. */
  273. img,
  274. svg,
  275. video,
  276. canvas,
  277. audio,
  278. iframe,
  279. embed,
  280. object {
  281. display: block; /* 1 */
  282. vertical-align: middle; /* 2 */
  283. }
  284. /*
  285. Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
  286. */
  287. img,
  288. video {
  289. max-width: 100%;
  290. height: auto;
  291. }
  292. /* Make elements with the HTML hidden attribute stay hidden by default */
  293. [hidden] {
  294. display: none;
  295. }