Skip to content

Commit

Permalink
ci: Check for use of SCSS random() (#40666)
Browse files Browse the repository at this point in the history
Normal CSS can't do random numbers. SCSS has a `random()` function,
which produces random values in the output CSS. Unfortunately this makes
the built CSS change for each build, which means that every PR merged
will require a Simple deploy. To avoid this, add a CI check looking for
calls to the function in all `.scss` files.

Also do the same for `unique-id()`.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12400572435

Upstream-Ref: Automattic/jetpack@3ed576d
  • Loading branch information
anomiex authored and matticbot committed Dec 18, 2024
1 parent a0a99f5 commit e857cb2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This is an alpha version! The changes listed here are not final.
- Fix migration key fetch failing when DIY migration page is reloaded
- Gutenberg 19.8.0 hotfix: don't show the template-locked rendering mode for pages
- Holiday Snow: do not display on p2s.
- Holiday snow: Replace SCSS `random()` with pregenerated arrays of random numbers to make builds reproducable.
- Load WPCOM sidebar notice async
- Restore visited button color in themes.php to Core's default
- Starter page templates: correctly insert the pattern to the Content block when rendering mode is template-locked
Expand Down
2 changes: 1 addition & 1 deletion src/build/holiday-snow/holiday-snow.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '245c23ca920a321a84cb');
<?php return array('dependencies' => array(), 'version' => '9d60d5e59cb26f8f3085');
2 changes: 1 addition & 1 deletion src/build/holiday-snow/holiday-snow.css

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

2 changes: 1 addition & 1 deletion src/build/holiday-snow/holiday-snow.rtl.css

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

0 comments on commit e857cb2

Please sign in to comment.