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

Modernize Site Kit PostCSS configuration for modern browsers #8414

Open
kuasha420 opened this issue Mar 19, 2024 · 1 comment
Open

Modernize Site Kit PostCSS configuration for modern browsers #8414

kuasha420 opened this issue Mar 19, 2024 · 1 comment
Labels
P2 Low priority Type: Infrastructure Engineering infrastructure & tooling

Comments

@kuasha420
Copy link
Collaborator

kuasha420 commented Mar 19, 2024

Feature Description

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.

QA Brief

Changelog entry

@kuasha420 kuasha420 added P2 Low priority Type: Infrastructure Engineering infrastructure & tooling labels Mar 19, 2024
@kuasha420 kuasha420 removed their assignment May 7, 2024
@tofumatt tofumatt self-assigned this May 13, 2024
@tofumatt
Copy link
Collaborator

Nice, IB ✅

@tofumatt tofumatt removed their assignment May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Low priority Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

2 participants