Skip to content

Commit

Permalink
feat: 全局默认box-sizing: border-box;降低元素布局难度。
Browse files Browse the repository at this point in the history
  • Loading branch information
preschooler committed Aug 25, 2024
1 parent f0832bf commit a27b14e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TagsView/src/TagsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ watch(
&__item {
position: relative;
top: 2px;
top: 3px;
height: calc(~'100% - 6px');
padding-right: 25px;
margin-left: 4px;
Expand Down
2 changes: 1 addition & 1 deletion src/layout/components/AppView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getCaches = computed((): string[] => {
<template>
<section
:class="[
'flex-1 p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
'flex-1 p-[var(--app-content-padding)] w-full bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
]"
>
<router-view>
Expand Down
8 changes: 8 additions & 0 deletions src/styles/var.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@
.dark {
--app-content-bg-color: var(--el-bg-color);
}

*,
:after,
:before {
margin: 0;
padding: 0;
box-sizing: border-box;
}

0 comments on commit a27b14e

Please sign in to comment.