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

Fix modals in Edge. #12241

Merged
merged 1 commit into from Nov 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion packages/components/src/modal/style.scss
Expand Up @@ -66,13 +66,20 @@
justify-content: space-between;
background: $white;
align-items: center;
box-sizing: border-box;
Copy link
Member

Choose a reason for hiding this comment

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

Was this just not needed anymore? It doesn’t seem related to the other changes.

Copy link
Contributor Author

@jasmussen jasmussen Nov 23, 2018

Choose a reason for hiding this comment

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

Yes, good catch, I should've noted that as a code comment. Turns out that rule was written out twice in the same rule. Here it is on line 61, still there:

box-sizing: border-box;

Thank you for the review.

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

// Rules inside this query are only run by Microsoft Edge.
// Edge has bugs around position: sticky;, so it needs a separate top rule.
// See also https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17555420/.
@supports (-ms-ime-align:auto) {
position: fixed;
width: 100%;
}

.components-modal__header-heading {
font-size: 1em;
font-weight: 400;
Expand Down Expand Up @@ -107,4 +114,10 @@
box-sizing: border-box;
height: 100%;
padding: 0 $grid-size-large $grid-size-large;

// Rules inside this query are only run by Microsoft Edge.
// This is a companion top padding to the fixed rule in line 77.
@supports (-ms-ime-align:auto) {
padding-top: $header-height;
}
}