This repository has been archived on 2025-03-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coryd.dev-eleventy/src/assets/styles/components/modal.css
2024-10-06 11:37:03 -07:00

67 lines
No EOL
1.1 KiB
CSS

.modal-wrapper {
width: 100%;
height: 100%;
inset: 0;
background: var(--modal-overlay-background);
position: fixed;
z-index: 3;
& .modal-body {
position: fixed;
background: var(--background-color);
height: 100%;
width: 100%;
inset: 0;
overflow-y: scroll;
border-radius: var(--border-radius-slight);
padding: var(--spacing-lg) var(--spacing-base);
& h3 {
margin-top: 0;
}
@media screen and (min-width: 768px) {
max-height: 75%;
max-width: 75%;
inset: 12.5%;
border: var(--border-gray);
}
& .modal-close {
position: sticky;
top: 0;
left: 100%;
height: var(--sizing-svg-base);
width: var(--sizing-svg-base);
}
}
}
.modal-input {
display: none;
&:checked ~ .modal-wrapper {
display: block;
}
&:not(:checked) ~ .modal-wrapper {
display: none;
}
}
.modal-toggle,
.modal-close {
cursor: pointer;
display: inline-flex;
vertical-align: middle;
& svg {
stroke: var(--accent-color);
&:hover,
&:focus,
&:active {
stroke: var(--accent-color-hover);
}
}
}