Added animation to search modal

This commit is contained in:
fechin committed 2022-11-17 15:26:47 +08:00
1 parent b3df7f078e
commit 0488237108
5 files changed
+48 -1

No files matched your search

+1
View File
@@ -71,6 +71,7 @@
"postcss-minify": "^1.1.0",
"sync-request": "^6.1.0",
"tailwindcss": "^3.0.1",
"tailwindcss-animate": "^1.0.5",
"tailwindcss-cli": "^0.1.2"
}
}
+4 -1
View File
@@ -1,6 +1,9 @@
module.exports = {
darkMode: 'class', // or 'media' or 'class'
plugins: [],
plugins: [
// https://github.com/jamiebuilds/tailwindcss-animate
require("tailwindcss-animate"),
],
theme: {
boxShadow: {
/* Customized */
@@ -0,0 +1,34 @@
@layer components {
.openAnimation {
animation: 200ms cubic-bezier(0, 0, 0.2, 1) 0s 1 normal both running openAnimation;
}
.closeAnimation {
animation: 200ms cubic-bezier(0.4, 0, 1, 1) 0s 1 normal both running closeAnimation;
}
}
@keyframes openAnimation {
from {
transform: scale(0.8);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
@keyframes closeAnimation {
from {
transform: scale(1);
opacity: 1;
}
to {
transform: scale(0.8);
opacity: 0;
}
}
@@ -1,3 +1,11 @@
#mysearch {
@apply animate-in fade-in duration-200;
}
#mysearch-box {
animation: 200ms cubic-bezier(0, 0, 0.2, 1) 0s 1 normal both running openAnimation;
}
#mysearch em {
@apply not-italic text-emerald-500;
}
+1
View File
@@ -4,6 +4,7 @@
/* Custom Components */
@import "components/layer.css";
@import "highlightjs/stackoverflow-light.min.css";
@import "components/layout_table.css";
@import "components/layout_list.css";