Skip to content

Commit

Permalink
styles for modal and hide hidden fields
Browse files Browse the repository at this point in the history
hidden fields take up white space so setting to display none
  • Loading branch information
DanCollinz committed May 20, 2024
1 parent b4782b8 commit 6e58b3b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
4 changes: 4 additions & 0 deletions blocks/form/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ main .form .form-wrapper {
padding: var(--form-padding);
}

main .form .field-wrapper.form-hidden-wrapper {
display:none;
}

main .form>div:not(:first-child) {
display: none;
}
Expand Down
19 changes: 11 additions & 8 deletions blocks/modal/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ body.modal-open {
}

.modal dialog {
--dialog-border-radius: 16px;
--dialog-border-radius: 8px;

overscroll-behavior: none;
border: 1px solid #ccc;
Expand All @@ -14,32 +14,35 @@ body.modal-open {
.modal dialog .modal-content {
overflow-y: auto;
overscroll-behavior: none;
max-height: calc(100dvh - 60px);
max-height: calc(100dvh - 120px);
}

@media (width >= 600px) {
.modal dialog {
padding: 30px;
padding: 40px;
width: 80vw;
max-width: 700px;
}

.modal dialog .modal-content {
max-height: calc(100vh - 90px);
max-height: calc(100vh - 120px);
}
}

.modal dialog .modal-content .default-content-wrapper h2 {
text-align: center;

}
.modal dialog::backdrop {
background-color: rgb(0 0 0 / 50%);
}

.modal .close-button {
position: absolute;
top: 0;
right: 0;
right: 20px;
width: 20px;
height: 100%;
max-height: 54px;
height: 20px;
max-height: 20px;
border-radius: 0 var(--dialog-border-radius) 0 0;
background-color: unset;
text-overflow: clip;
Expand Down
2 changes: 1 addition & 1 deletion scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sampleRUM('cwv');
// add more delayed functionality here

const loadAdobeDTM = async () => {
await loadScript('https://assets.adobedtm.com/8fee56b0a165/17899e6850f3/launch-1c377528b01b-development.min.js');
// await loadScript('https://assets.adobedtm.com/8fee56b0a165/17899e6850f3/launch-1c377528b01b-development.min.js');
};

await loadAdobeDTM();

0 comments on commit 6e58b3b

Please sign in to comment.