Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Post: Fix Welcome Guide modal display for Internet Explorer #19201

Merged
merged 4 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/components/src/guide/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}

&__container {
align-items: center;
display: flex;
flex-direction: column;
margin-top: -$header-height;
Expand Down Expand Up @@ -107,7 +106,7 @@
right: 0;

@include break-small() {
display: unset;
display: block;
}
}

Expand Down
6 changes: 5 additions & 1 deletion packages/components/src/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@
background: $white;
align-items: center;
height: $header-height;
z-index: z-index(".components-modal__header");
// For z-index to take effect, the element must be positioned. A "sticky"
// element is positioned, but since this is not supported in IE11,
// "relative" is used as a fallback.
position: relative;
Copy link
Contributor

@gwwar gwwar Dec 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an FYI if folks need a stacking context, any of the other rules on https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context will also do the trick, in case changing position has other side effects folks want to avoid.

https://developer.mozilla.org/en-US/docs/Web/CSS/isolation for example only does this, but it's unsupported by IE.

position: sticky;
top: 0;
z-index: z-index(".components-modal__header");
margin: 0 -#{$grid-size-xlarge} $grid-size-xlarge;

// Rules inside this query are only run by Microsoft Edge.
Expand Down
6 changes: 4 additions & 2 deletions packages/edit-post/src/components/welcome-guide/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
margin: $grid-size 0;

@include break-small() {
height: $image-height;
left: 0;
position: absolute;
left: 0;
top: 50%;
height: $image-height;
width: $image-width;
margin-top: -0.5 * $image-height;
}
}

Expand Down