Ver Fonte

Merge pull request #522 from lilangkit/hotfix/box-sizing

feat: 全局默认box-sizing: border-box;降低元素布局难度。
Archer há 11 meses atrás
pai
commit
54622c5c9a
2 ficheiros alterados com 9 adições e 1 exclusões
  1. 1 1
      src/components/TagsView/src/TagsView.vue
  2. 8 0
      src/styles/var.css

+ 1 - 1
src/components/TagsView/src/TagsView.vue

@@ -514,7 +514,7 @@ watch(
 
   &__item {
     position: relative;
-    top: 2px;
+    top: 3px;
     height: calc(~'100% - 6px');
     padding-right: 25px;
     margin-left: 4px;

+ 8 - 0
src/styles/var.css

@@ -59,3 +59,11 @@
 .dark {
   --app-content-bg-color: var(--el-bg-color);
 }
+
+*,
+:after,
+:before {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+}