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

SWED-2543 increase css browserslist support #1027

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@

## Technical changes

- Browser support got significantly increased (now last 2 major versions, Firefox ESR, > 0,5% instead of 1%).
- This is only impacting projects consuming the CSS & JS straight from the CDN. If you're pulling the source files then the polyfilling/transpilling will only be done by your own build pipeline anyways.
- updated dependencies
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"homepage": "https://github.com/swedbankpay/design.swedbankpay.com#readme",
"browserslist": [
"last 3 versions",
"> 1%",
"last 2 major versions",
"> 0.5%",
"Firefox ESR",
"not dead"
],
"dependencies": {
Expand Down
10 changes: 9 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
const postcssPresetEnv = require("postcss-preset-env");

module.exports = {
plugins: [["postcss-preset-env"]],
plugins: [
postcssPresetEnv({
stage: 2,
minimumVendorImplementations: 2,
preserve: true,
}),
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ exports[`GetStarted: ForDevelopers Installation renders 1`] = `
<b>
Target Browser:
</b>
"Last 3 versions, &gt; 1%, not dead"
"Last 3 versions, Last 2 major versions, &gt; 0.5%, not dead"
</p>
</div>
<h4>
Expand All @@ -1180,6 +1180,9 @@ exports[`GetStarted: ForDevelopers Installation renders 1`] = `
It is up to every Project manager and development team to decide which browsers their product should support. If you want to support other browsers than the ones supported by the Design Guide you need to maintain and test the component code in in your project.

</p>
<p>
We of course encourage to use PostCSS to do that in your build pipeline.
</p>
</section>
</section>
`;
6 changes: 5 additions & 1 deletion src/App/GetStarted/get-started/ForDevelopers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ const BrowserSupport = () => (
<div className="alert alert-informative mt-4">
<i className="at-info-circle" aria-hidden="true"></i>
<p>
<b>Target Browser:</b> &quot;Last 3 versions, &gt; 1%, not dead&quot;
<b>Target Browser:</b> &quot;Last 3 versions, Last 2 major versions,
&gt; 0.5%, not dead&quot;
</p>
</div>
<h4>Browser support for products using the Design Guide</h4>
Expand All @@ -360,6 +361,9 @@ const BrowserSupport = () => (
browsers than the ones supported by the Design Guide you need to maintain
and test the component code in in your project.{" "}
</p>
<p>
We of course encourage to use PostCSS to do that in your build pipeline.
</p>
</section>
);
const GridAndBreakpoints = () => (
Expand Down
Loading