Skip to content

Commit

Permalink
fix(Modal): ensure IE11 is placing the close button to the right side
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Feb 9, 2022
1 parent 2c9fa02 commit 1aab80f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,12 @@ html[data-dnb-modal-active] {
display: flex;
flex-direction: row;
justify-content: space-between; }
@media screen and (-ms-high-contrast: none) {
.dnb-modal__header__bar.dnb-section {
align-items: center; } }
@media screen and (-ms-high-contrast: none) {
.dnb-core-style .dnb-modal__header__bar__close {
margin-left: auto; } }
.dnb-modal__content--spacing .dnb-modal__header__bar.dnb-section {
margin-top: calc(var(--modal-spacing) * 1.75);
margin-bottom: calc(var(--modal-spacing) / 2); }
Expand Down
20 changes: 16 additions & 4 deletions packages/dnb-eufemia/src/components/modal/style/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,22 @@ html[data-dnb-modal-active] {
}
}

&__header__bar.dnb-section {
display: flex;
flex-direction: row;
justify-content: space-between;
&__header__bar {
&.dnb-section {
display: flex;
flex-direction: row;
justify-content: space-between;

@include IS_IE() {
align-items: center; // IE11 uses top as default
}
}

@include IS_IE() {
.dnb-core-style &__close {
margin-left: auto; // place the button to the right side
}
}
}

&__content--spacing &__header__bar.dnb-section {
Expand Down

0 comments on commit 1aab80f

Please sign in to comment.