Skip to content

Commit

Permalink
Add @media print to enable printing of articles in modals
Browse files Browse the repository at this point in the history
This `@media print` CSS changes affect styles only during print.
  • Loading branch information
kasperbirch1 committed Oct 15, 2024
1 parent 75fa33f commit 989892d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/stories/Library/Modals/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,22 @@
justify-content: flex-end;
padding: 20px;
}

// Adjust the modal to display all content when printing
@media print {
.modal {
position: static !important;
overflow: visible !important;
width: auto !important;
height: auto !important;
opacity: 1 !important;
display: block !important;
}

// Hide elements that shouldn't appear in print
.modal-backdrop,
.modal-btn-close,
.modal-btn-fallback {
display: none !important;
}
}

0 comments on commit 989892d

Please sign in to comment.