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

Autoprefixer warnings about the partially supported align-items: start; CSS rule #13518

Closed
Snuffleupagus opened this issue Jun 8, 2021 · 2 comments · Fixed by #13521
Closed
Assignees

Comments

@Snuffleupagus
Copy link
Collaborator

After PR #13479 landed, building the PDF.js library now produces warnings from the Autoprefixer package.
For example, with gulp generic the following is printed in the console:

[21:33:58] gulp-postcss: viewer.css
autoprefixer: C:\Users\Jonas\Git\pdf.js\viewer.css:383:3: start value has mixed support, consider using flex-start instead
autoprefixer: C:\Users\Jonas\Git\pdf.js\viewer.css:393:3: start value has mixed support, consider using flex-start instead

with those warnings originating at

According to MDN, please see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items#browser_compatibility, only Firefox supports align-items: start; currently.

@calixteman Can we make the change suggested by Autoprefixer (in which case I'd happily submit a patch), or would that break the layout of XFA documents (in which case I'm guessing this is wontfix)?

Or, could it possibly make sense to at least amend the code with the following in those two cases?

align-items: flex-start;
align-items: start;
@calixteman
Copy link
Contributor

I missed that... Could we add this css lint to gulp lint ?
Anyway, after reading the doc, I think replacing start by flex-start is fine.

@Snuffleupagus Snuffleupagus self-assigned this Jun 8, 2021
@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Jun 9, 2021

Could we add this css lint to gulp lint ?

Please note this warning only happens during building, and the gulp lint simply checks the source files as-is (since building as well would be quite a bit slower than it already is).
Furthermore, while there is a PostCSS plugin for treating warnings as errors it unfortunately (in my testing) doesn't seem to actually work with the gulp-versions of the PostCSS package that we use.

Given the above, I'm just going to fix the issue and defer the linting part for now (this is also the first time we've seen such a warning).

Edit: I've also tried the stylelint-no-unsupported-browser-features plugin, for our existing linting, but that doesn't appear to pick up this error unfortunately :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants