Skip to content

Stylelint: no token fallback values (VideoPress, Search, Forms, Publicize, & Boost) - #50527

Merged
simison merged 5 commits into
trunkfrom
update/stylelint-more-no-token-fallback-values
Jul 16, 2026
Merged

Stylelint: no token fallback values (VideoPress, Search, Forms, Publicize, & Boost)#50527
simison merged 5 commits into
trunkfrom
update/stylelint-more-no-token-fallback-values

Conversation

@simison

@simison simison commented Jul 15, 2026

Copy link
Copy Markdown
Member

Follow-up to #50110 which added linting for WPDS tokens but didn't enforce the "no fallbacks" rule yet.

At #50502 we started enforcing WP Build routes; this PR starts enforcing some of the bundles now using @wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks to inject fallbacks automatically at build time.

Proposed changes

  • Lint "no token fallbacks" for bundles using @wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks
  • Remove var(--wpds-*, …) fallbacks: all of them matched with canonical @wordpress/theme values
  • Remove redundant legacy Jetpack token fallbacks in Forms if they were as fallback (2nd var), not if they are primary (1st var). Forms sometimes just uses WPDS tokens as fallbacks which would be good to clean up but not in this PR.
Bundles mostly stay the same **Confirmed.** Before (`85920e3b10`) vs after (`8cbbea829d`) builds of search, publicize, videopress, forms, and boost are the same aside from WPDS fallback corrections (and the style content-hashes those change).

Bundle identity

Package Files Byte-identical Diff cause
search 78 78 none
videopress 42 42 none
boost 4 4 none
forms (dist+build) 101 95 fallback corrections only
publicize 15 7 fallback corrections only

After normalizing var(--wpds-*, …) fallbacks (and the data-wp-hash / registerStyle hashes driven by that CSS), all 240 comparable CSS/JS files match. Token sequences and counts are unchanged.

Fallback corrections (manual → theme)

Only forms and publicize changed. Search/VideoPress/Boost had no mismatched manual fallbacks in these builds.

Token Before (manual) After (theme)
--wpds-color-background-surface-neutral-weak #e7e7e7 #f4f4f4
--wpds-color-stroke-surface-neutral var(--jp-forms-border-color, #e0e0e0) #dbdbdb
--wpds-color-stroke-surface-neutral-weak #e4e4e4 #f0f0f0
--wpds-color-foreground-content-neutral var(--jp-gray-80) / #50575e #1e1e1e
--wpds-color-foreground-content-neutral-weak #757575 #707070
--wpds-color-foreground-content-error #d63638 #470000
--wpds-color-stroke-focus #3858e9 var(--wp-admin-theme-color, #3858e9)
--wpds-border-width-focus 2px var(--wp-admin-border-width-focus, 2px)
--wpds-motion-duration-md 0.15s 200ms
--wpds-motion-easing-balanced ease-out cubic-bezier(0.4, 0, 0.2, 1)

Related product discussion/links

Does this pull request change what data or activity we track or use?

Testing instructions

  • Compare bundles; everything should now have fallback values
  • Smoke test affected UIs

@simison
simison requested a review from a team as a code owner July 15, 2026 08:41
@simison simison added [Block] VideoPress [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Package] Publicize [Package] VideoPress [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Package] Forms Build labels Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the update/stylelint-more-no-token-fallback-values branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/stylelint-more-no-token-fallback-values

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Block] Contact Form [Feature] Contact Form [Feature] Publicize Now Jetpack Social, auto-sharing [Package] Search Contains core Search functionality for Jetpack and Search plugins labels Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • 🔴 Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Boost plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jul 15, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@simison

simison commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

FYI I still need to do a bit more testing but in theory this is ready :-)

simison added 5 commits July 16, 2026 15:25
Strip hand-written --wpds-* fallbacks from Forms, Publicize, and Search
styles now covered by the no-token-fallback-values stylelint override.
@simison
simison force-pushed the update/stylelint-more-no-token-fallback-values branch from 5b22b10 to 8cbbea8 Compare July 16, 2026 12:25
@simison
simison merged commit 91412e0 into trunk Jul 16, 2026
80 of 81 checks passed
@simison
simison deleted the update/stylelint-more-no-token-fallback-values branch July 16, 2026 13:12
@github-actions github-actions Bot removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Contact Form [Block] VideoPress Build [Feature] Contact Form [Feature] Publicize Now Jetpack Social, auto-sharing [Package] Forms [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] VideoPress [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant