Currently, Site Kit uses the default postcss-preset-env with 6.7.0 version which was released 3 years ago. As discovered while working on #8163, this results in needless polyfilling of modern CSS features that are well supported in our target version of browsers. We should explore updating the related infrastructure and configuration to utilize modern CSS features without polyfilling/transpilation and hopefully reducing the resulting CSS bundle.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Site Kit browserlist config should be updated to use the 5.40.0 version of @wordpress/browserslist-config that dropped support for Internet Explorer 11, since Site Kit does not support Internet Explorer.
CSS Build infrastructure should be updated no longer polyfill Stage 2 CSS features that are supported by the the Site Kit supported browsers, determined by the updated @wordpress/browserslist-config.
Implementation Brief
Update @wordpress/browserslist-config package to 5.40.0.
Update postcss-preset-env package to 9.5.11.
Search for 'TODO' comments related to logical-properties-and-values in **/*.scss files, and remove the comments and the corresponding CSS overrides.
A POC PR is available here that can be used as a starting point.
Test Coverage
No tests needed, but existing VRTs should pass without changes.
QA Brief
Do a quick smoke test to ensure that everything looks the same.
Also follow QA Brief from #8163 to make sure that nothing is broken there.
Feature Description
Currently, Site Kit uses the default
postcss-preset-env
with6.7.0
version which was released 3 years ago. As discovered while working on #8163, this results in needless polyfilling of modern CSS features that are well supported in our target version of browsers. We should explore updating the related infrastructure and configuration to utilize modern CSS features without polyfilling/transpilation and hopefully reducing the resulting CSS bundle.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
5.40.0
version of@wordpress/browserslist-config
that dropped support for Internet Explorer 11, since Site Kit does not support Internet Explorer.@wordpress/browserslist-config
.Implementation Brief
@wordpress/browserslist-config
package to5.40.0
.postcss-preset-env
package to9.5.11
.logical-properties-and-values
in**/*.scss
files, and remove the comments and the corresponding CSS overrides.Test Coverage
QA Brief
Changelog entry