https://kittygiraudel.com/2020/05/18/using-calc-to-figure-out-optimal-line-height/
line-height: calc(0.25rem + 1em + 0.25rem);
*:not(fieldset, progress, meter) {
background-origin: border-box;
background-repeat: no-repeat;
-webkit-text-size-adjust: none;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
/* 只有在设置了 roll="list" 的时候才显示符号,防止在想要的时候但渲染不出来 */
ul[role="list"], ol[role="list"] {
-webkit-font-smoothing: antialiased;
/* https://marco.org/2012/11/15/text-rendering-optimize-legibility */
text-rendering: optimizeSpeed;
/* https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter#example_2 */
/* scrollbar-gutter: stable both-edges; Removed until this bug is fixed: https://bugs.chromium.org/p/chromium/issues/detail?id=1318404#c2 */
@media (prefers-reduced-motion: no-preference) {
/* 如果当前页面获取到了焦点,则使得滚动变得平滑 */
/* 如果在页面中使用 ctrl + f 搜索内容则不启用平滑滚动 */
/* 如果在偏好设置里设置了减少动画,则将所有的动画、过渡加快 */
@media (prefers-reduced-motion: reduce) {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
img, svg, video, canvas, audio, iframe, embed, object {
:where(input,button,textarea,select) {
/* 没有设置类名的 a 元素恢复成默认样式 */
text-decoration-skip-ink: auto;
/* 移除描边并设置填充颜色为继承的字体颜色 */
:where(svg):where(:not([fill])) {
/* Remove fill and set stroke colour to the inherited font colour */
/* 如果没有携带 width 则设置默认值 */
:where(svg):where(:not([width])) {
:where(input, button, textarea, select),
:where(input[type="file"])::-webkit-file-upload-button {
caret-color: var(--color-theme, #00c483);
/* 更改文本区域的大小调整为仅垂直和仅当浏览器支持块 */
@supports (resize: block) {
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
:where(a[href], area, button, input:not([type="text"]), label[for], select, summary, textarea, [tabindex]:not([tabindex*="-"])) {
touch-action: manipulation;
accent-color: var(--color-theme, #00c483);
:where(input[type="file"]) {
:where(input[type="file"])::-webkit-file-upload-button,
:where(input[type="file"])::file-selector-button {
input[type="file"]::-webkit-file-upload-button,
input[type="file"]::file-selector-button {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"])[disabled] {