diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 01:34:19 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 01:34:19 -0700 |
commit | cd6a3a56b0a9f27dd7250c7641776fe1bd184888 (patch) | |
tree | b26c2731e39c63b748ac3bc76cc977419bae4746 /src/css/modal.css | |
parent | 1ec5a8d088f599d094f387abc6014f228607b605 (diff) | |
download | the-abstraction-engine-cd6a3a56b0a9f27dd7250c7641776fe1bd184888.tar.gz the-abstraction-engine-cd6a3a56b0a9f27dd7250c7641776fe1bd184888.zip |
add modal interaction with code
Diffstat (limited to 'src/css/modal.css')
-rw-r--r-- | src/css/modal.css | 67 |
1 files changed, 67 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); + } +} |