| 1 | /* CSS Reset - 删除浏览器默认样式 */ |
| 2 | |
| 3 | /* 1. Use a more-intuitive box-sizing model */ |
| 4 | *, *::before, *::after { |
| 5 | box-sizing: border-box; |
| 6 | } |
| 7 | |
| 8 | /* 2. Remove default margin and padding */ |
| 9 | * { |
| 10 | margin: 0; |
| 11 | padding: 0; |
| 12 | } |
| 13 | |
| 14 | /* 3. Allow percentage-based heights in the application */ |
| 15 | html, body { |
| 16 | height: 100%; |
| 17 | } |
| 18 | |
| 19 | /* 4. Add accessible line-height and improve text rendering */ |
| 20 | body { |
| 21 | line-height: 1.5; |
| 22 | -webkit-font-smoothing: antialiased; |
| 23 | -moz-osx-font-smoothing: grayscale; |
| 24 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', |
| 25 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', |
| 26 | sans-serif; |
| 27 | } |
| 28 | |
| 29 | /* 5. Improve media defaults */ |
| 30 | img, picture, video, canvas, svg { |
| 31 | display: block; |
| 32 | max-width: 100%; |
| 33 | } |
| 34 | |
| 35 | /* 6. Remove built-in form typography styles */ |
| 36 | input, button, textarea, select { |
| 37 | font: inherit; |
| 38 | } |
| 39 | |
| 40 | /* 7. Avoid text overflows */ |
| 41 | p, h1, h2, h3, h4, h5, h6 { |
| 42 | overflow-wrap: break-word; |
| 43 | } |
| 44 | |
| 45 | /* 8. Create a root stacking context */ |
| 46 | #root, #__next, #app { |
| 47 | isolation: isolate; |
| 48 | } |
| 49 | |
| 50 | /* 9. Remove list styles */ |
| 51 | ul, ol { |
| 52 | list-style: none; |
| 53 | } |
| 54 | |
| 55 | /* 10. Remove default button styles */ |
| 56 | button { |
| 57 | background: none; |
| 58 | border: none; |
| 59 | cursor: pointer; |
| 60 | } |
| 61 | |
| 62 | /* 11. Remove default link styles */ |
| 63 | a { |
| 64 | text-decoration: none; |
| 65 | color: inherit; |
| 66 | } |
| 67 | |
| 68 | /* 12. Remove default table styles */ |
| 69 | table { |
| 70 | border-collapse: collapse; |
| 71 | border-spacing: 0; |
| 72 | } |
| 73 | |
| 74 | /* 13. Remove default fieldset styles */ |
| 75 | fieldset { |
| 76 | border: none; |
| 77 | } |
| 78 | |
| 79 | /* 14. Remove default legend styles */ |
| 80 | legend { |
| 81 | display: table; |
| 82 | } |
| 83 | |
| 84 | /* 15. Remove default details/summary styles */ |
| 85 | details { |
| 86 | display: block; |
| 87 | } |
| 88 | |
| 89 | summary { |
| 90 | display: list-item; |
| 91 | } |
| 92 | |
| 93 | /* 16. Remove default hr styles */ |
| 94 | hr { |
| 95 | border: none; |
| 96 | height: 1px; |
| 97 | background: #ccc; |
| 98 | } |
| 99 | |
| 100 | /* 17. Remove default blockquote styles */ |
| 101 | blockquote { |
| 102 | quotes: none; |
| 103 | } |
| 104 | |
| 105 | blockquote:before, |
| 106 | blockquote:after { |
| 107 | content: ''; |
| 108 | content: none; |
| 109 | } |
| 110 | |
| 111 | /* 18. Remove default cite styles */ |
| 112 | cite { |
| 113 | font-style: normal; |
| 114 | } |
| 115 | |
| 116 | /* 19. Remove default address styles */ |
| 117 | address { |
| 118 | font-style: normal; |
| 119 | } |