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

Remove Grid Autoprefixing #197

Merged
merged 4 commits into from
May 16, 2022
Merged

Conversation

Antonio-Laguna
Copy link
Member

Description of the Change

This removes Autoprefixing Grid by default. Autoprefixer has this option defaulting to false given that not all of grid's features can be safely polyfilled/covered by Autoprefixer behavior.

Given that IE11 is out of support and that, if there's a need authors can manually polyfill as needed, it's most sensible to return this to be false by default as Autoprefixer's warnings create a blocking screen when using Fast Refresh

Fixes #196

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

  • Updated. By default postcss-preset-env won't enable automatic autoprefixing of CSS Grid anymore. This feature produces warnings whenever Grid features can't be polyfilled for IE which collided with Fast Refresh.
    If you need to support IE11 and Grids you can either manually polyfill or re-enable prefixing with the following snippet on your postcss.config.js file:
const baseConfig = require('10up-toolkit/config/postcss.config.js');
const path = require('path');

module.exports = (props) => {
	const config = baseConfig(props);
	config.plugins['postcss-preset-env'].autoprefixer = { grid: true };

	return config;
};

@nicholasio nicholasio added this to the 10up-toolkit@4.1.0 milestone May 16, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@nicholasio nicholasio merged commit 76d0844 into develop May 16, 2022
@nicholasio nicholasio deleted the feature/disable-grid-autoprefixing branch May 16, 2022 12:12
@nicholasio nicholasio removed this from the 10up-toolkit@4.1.0 milestone Jun 2, 2022
@github-actions github-actions bot mentioned this pull request Jun 6, 2022
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.

Toolkit still shows IE11 related warnings in the console and HMR overlay
2 participants