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 latest 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 latest (5.40.0 at the time of writing).
Update postcss-preset-env package to latest (9.5.11 at the time of writing, and known to work with Site Kit build infrastructure).
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.
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
@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 to latest (5.40.0
at the time of writing).postcss-preset-env
package to latest (9.5.11
at the time of writing, and known to work with Site Kit build infrastructure).logical-properties-and-values
in**/*.scss
files, and remove the comments and the corresponding CSS overrides.Test Coverage
QA Brief
Changelog entry