-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Remove button styles if the block theme has button styles defined in theme.json #36225
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
Remove button styles if the block theme has button styles defined in theme.json #36225
Conversation
| .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)), | ||
| :where(body:not(.woocommerce-block-theme-has-button-styles)) .woocommerce { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI to ease the review: I hadn't made any changes to the styles below 👇 , they appear in the diff because they were moved from another section of the document.
Test Results SummaryCommit SHA: 37e9502
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
gigitux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@jorgeatorres, is this PR on your radar? Wondering if there is anything we can do to help this being merged in time for WC 7.4. |
jorgeatorres
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you @Aljullu!
…theme.json (#36225) * Remove button styles if the block theme has their own * Fix button style in TT2
…theme.json (#36225) * Remove button styles if the block theme has their own * Fix button style in TT2
All Submissions:
Changes proposed in this Pull Request:
This PR adds a
.woocommerce-block-theme-has-button-stylesclass to thebodyelement of the page if the theme in use is a block theme that defines button styles intheme.jsonusing the Elements API. Using that class, we then disable all button styling provided by WC core (I used a:where()selector so these changes shouldn't affect the specificity of CSS selectors).Closes woocommerce/woocommerce-blocks#7972 (Shop and product page buttons).
How to test the changes in this Pull Request:
theme.jsonand is not Twenty Twenty-Three.trunkand this branch.Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: