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

USWDS - Flex: Test and ensure flex shorthands work across browsers. #3480

Merged
merged 11 commits into from Jun 16, 2020

Conversation

mejiaj
Copy link
Contributor

@mejiaj mejiaj commented May 20, 2020

Description

Fixes #3386. This should ensure flex properties work across all browsers. Currently flex-fill has been known to cause issues in IE11.

Additional information

Include any of the following (as necessary):

  • Relevant research and support documents
  • Type of content review needed: stylistic or copy editing
  • Screenshot images
  • Notes

Before you hit Submit, make sure you’ve done whichever of these applies to you:

  • Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • Run npm test and make sure the tests for the files you have changed have passed.
  • Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@mejiaj
Copy link
Contributor Author

mejiaj commented May 29, 2020

Added 0% values to flex shorthands to get them working in IE11. Based on this guidance by Philip Walton.

I've also created this flex test page here.

Problem

Unitless flex shorthand is causing incorrect widths in IE11.

Firefox

image

IE11

image


The only problem left is minification from CSSO keeps stripping the % from 0%. This was fixed in the latest release https://github.com/css/csso/releases/tag/v4.0.3

But that change hasn't made it to the plugin we're using
https://www.npmjs.com/package/postcss-csso

@thisisdano
Copy link
Member

I was able to update postcss-csso to use the most recent csso so I think this PR is good to go!

@thisisdano thisisdano marked this pull request as ready for review June 16, 2020 02:59
@thisisdano
Copy link
Member

Modified to use 1 as a shrink value. This prevents elements from extending beyond the boundaries of the flex parent:

Before

Screen Shot 2020-06-15 at 8 46 09 PM

After

Screen Shot 2020-06-15 at 8 42 31 PM

Screen Shot 2020-06-15 at 8 42 46 PM

Screen Shot 2020-06-15 at 8 42 55 PM

@mejiaj
Copy link
Contributor Author

mejiaj commented Jun 16, 2020

Everything looks good. Thanks for the change!

@thisisdano thisisdano merged commit 538838c into develop Jun 16, 2020
@thisisdano thisisdano deleted the jm-test-flex branch June 16, 2020 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sass] Flex fill on IE11.
2 participants