Skip to content

Commit

Permalink
fix: fix new #modal spacing, if no title is given
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Oct 22, 2020
1 parent 4210bf6 commit d77736b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1485,14 +1485,16 @@ button.dnb-button::-moz-focus-inner {
.dnb-modal__wrapper {
position: relative;
z-index: 1;
padding-top: calc(var(--modal-spacing) / 2);
padding-bottom: calc(var(--modal-spacing) * 1.75); }
@media screen and (max-width: 40em) {
.dnb-modal__wrapper {
padding-bottom: calc(var(--modal-spacing) * 1.25); } }
.dnb-modal__content--drawer .dnb-modal__wrapper {
padding-top: calc(var(--modal-spacing) * 0.75);
padding-bottom: calc(var(--modal-spacing) * 2); }
.dnb-modal__title ~ .dnb-modal__wrapper {
padding-top: calc(var(--modal-spacing) / 2); }
.dnb-modal__content--drawer .dnb-modal__title ~ .dnb-modal__wrapper {
padding-top: calc(var(--modal-spacing) * 0.75); }
.dnb-modal__wrapper__inner {
padding-bottom: calc(var(--modal-spacing) * 2);
margin-bottom: calc(var(--modal-spacing) * -1.75); }
Expand Down
8 changes: 6 additions & 2 deletions packages/dnb-ui-lib/src/components/modal/style/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,21 @@
position: relative;
z-index: 1;

padding-top: calc(var(--modal-spacing) / 2);
padding-bottom: calc(var(--modal-spacing) * 1.75);

@include allBelow(small) {
padding-bottom: calc(var(--modal-spacing) * 1.25);
}
}
&__content--drawer &__wrapper {
padding-top: calc(var(--modal-spacing) * 0.75);
padding-bottom: calc(var(--modal-spacing) * 2);
}
&__title ~ &__wrapper {
padding-top: calc(var(--modal-spacing) / 2);
}
&__content--drawer &__title ~ &__wrapper {
padding-top: calc(var(--modal-spacing) * 0.75);
}

&__wrapper__inner {
padding-bottom: calc(var(--modal-spacing) * 2);
Expand Down

0 comments on commit d77736b

Please sign in to comment.