refactor: more tailwind components

This commit is contained in:
Tristan Yang
2023-01-30 18:56:37 +08:00
parent 5a2ac0f4ed
commit f5aabee719
46 changed files with 185 additions and 796 deletions
+27 -2
View File
@@ -1,12 +1,37 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.flex-center {
@apply flex items-center justify-center;
}
}
@layer utilities {
.checkbox {
appearance: none;
margin: 0;
}
.checkbox::before {
content: "";
display: block;
width: 10px;
height: 10px;
margin: 4px;
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
transform: scale(0);
transform-origin: bottom left;
transition: 120ms transform ease-in-out;
box-shadow: inset 10px 10px #1fe1f9;
}
.checkbox:checked::before {
transform: scale(1);
}
}
/* 全局设置滚动条 */
::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 4px;
}
::-webkit-scrollbar {
background: transparent;
width: 5px;