diff options
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/modal.css | 67 | ||||
-rw-r--r-- | src/css/style.css | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/css/modal.css b/src/css/modal.css new file mode 100644 index 0000000..bd6f2a3 --- /dev/null +++ b/src/css/modal.css @@ -0,0 +1,67 @@ +/* The Modal (background) */ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + justify-content: center; /* Center horizontally */ + align-items: center; /* Center vertically */ + background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ + overflow: auto; /* Enable scroll if needed */ + animation: fadeIn 0.25s; /* Fade in the background */ +} + +/* Modal Content */ +.modal-content { + display: flex; + background-color: #282828; /* Gruvbox background */ + color: #ebdbb2; /* Gruvbox foreground */ + margin: auto; + padding: 20px; + border: 1px solid #928374; /* Gruvbox grey */ + width: 40%; /* Adjust as needed */ + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); + animation: scaleUp 0.25s; /* Scale animation */ + border-radius: 8px; /* Rounded corners */ + justify-content: center; /* Center horizontally */ +} + +/* Animations */ +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +@keyframes scaleUp { + from { + transform: scale(0.5); + } + to { + transform: scale(1); + } +} + +@keyframes scaleDown { + from { + transform: scale(1); + } + to { + transform: scale(0.5); + } +} diff --git a/src/css/style.css b/src/css/style.css index 8f72fce..2ff3cb2 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -1,5 +1,6 @@ @import url("./theme.css"); @import url("./tf.css"); +@import url("./modal.css"); @font-face { font-family: "scientifica"; |