Skip to content

Update all of AMP's CSS devDependencies to their latest versions#12512

Merged
rsimha merged 4 commits intoampproject:masterfrom
rsimha:2017-12-18-CssTools
Dec 20, 2017
Merged

Update all of AMP's CSS devDependencies to their latest versions#12512
rsimha merged 4 commits intoampproject:masterfrom
rsimha:2017-12-18-CssTools

Conversation

@rsimha
Copy link
Copy Markdown
Contributor

@rsimha rsimha commented Dec 18, 2017

This PR does the following:

  1. Updates all CSS related devDependencies via yarn add autoprefixer cssnano postcss postcss-import --dev --exact --latest
  2. Manually updates cssnano from v3.10.0 to v4.0.0-rc.2 to get past a deprecation warning for Node#moveTo. (See ben-eb/postcss-merge-rules#52)
  3. Updates some rules in build-system/tasks/create-golden-css/index.js and build-system/tasks/jsify-css.js to be compliant with cssnano v4, with minimum deviations from the CSS generated pre-upgrade.

This can be followed up with a PR that updates our cssnano settings and uses some of the new optimization features in v4.

Follow up to #12179, #12450, #12476, #12486, and #12499
Partial fix for #12181

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 18, 2017

/to @erwinmombay

This is as discussed in #12472 (comment)

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 18, 2017

@erwinmombay This PR passes Travis checks. Let me know if there's any documentation for the golden file check, and I can run it tomorrow.

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 19, 2017

CSS golden file check coming up in #12526.

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 20, 2017

@erwinmombay I tested the latest changes with gulp create-golden-css and generated a new golden file after updating some options. We are now as close to the original cssnano config as possible. The exceptions being what's in https://github.com/ampproject/amphtml/pull/12512/files#diff-f30964a2accb052b4e62450f31255bb1, all of which you reviewed and approved.

Merging this after tests go green.

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 20, 2017

@camelburrito @erwinmombay After this PR is merged, it's probably worth updating our cssnano settings and using some of the new optimization features in v4.

Full list of available packages here: https://github.com/ben-eb/cssnano/tree/master/packages

@rsimha rsimha merged commit c98961f into ampproject:master Dec 20, 2017
@rsimha rsimha deleted the 2017-12-18-CssTools branch December 20, 2017 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants