Block Directory: Use --wpds-cursor-control design token#77330
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
Updates @wordpress/block-directory styling to use the WP Design System cursor token so interactive control cursor behavior can be centrally configured.
Changes:
- Replace
cursor: pointerwithcursor: var(--wpds-cursor-control)in the Block Directory downloadable block list item. - Add a package-level Stylelint rule to disallow
cursor: pointerand guide contributors toward the design token. - Document the change in the
@wordpress/block-directorychangelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/block-directory/src/components/downloadable-block-list-item/style.scss | Switches interactive cursor styling to --wpds-cursor-control. |
| packages/block-directory/CHANGELOG.md | Adds an Unreleased enhancement entry describing the cursor-token update. |
| packages/block-directory/.stylelintrc.mjs | Adds a Stylelint guardrail preventing future cursor: pointer usage in this package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mirka
left a comment
There was a problem hiding this comment.
Thanks! Ready to merge once the stylelint change is removed.
* Update the usage of cursor pointer to use token css variable instead of hardcoded value * Remove the default value * Add changelog entry * Add stylelint rule to prevent usage of cursor pointer * Remove design token import from styles * Remove unused variable * Remove the style lint rule based on suggestion here WordPress/gutenberg#77330 (comment) Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Source: WordPress/gutenberg@07486b2

What?
Part of: #76221
Why?
cursor: pointerto use the desgin token for better maintainence.How?
cursor: pointerand usedcursor: var(--wpds-cursor-control);Testing Instructions
Testing Instructions for Keyboard
Use of AI Tools