This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
WooCommerce bundled styles conflict with Gutenberg/WordPress CustomSelectControl component styles #8746
Labels
focus: global styles
Issues that involve styles/css/layout structure.
priority: high
The issue/PR is high priority—it affects lots of customers substantially, but not critically.
team: Kirigami & Origami
type: bug
The issue/PR concerns a confirmed bug.
Describe the bug
Bundled WordPress components styles for the
CustomSelectControl
component appear to be causing styling conflicts within the post editor with both WooCommerce and the Gutenberg plugin active. Specifically, the bundled styles appear to be overriding the styles coming from Gutenberg, causing a styling issue with the Position dropdown within the block inspector. This new Position panel will be included in WordPress core version 6.2.To reproduce
Expected behavior
The styling rules for the
CustomSelectControl
component not to be overridden with the WooCommerce plugin active.Screenshots
Environment
WordPress (please complete the following information):
Desktop (please complete the following information):
Additional context
The cause of the styling conflict above appears to be that the version of the styles shipped with WooCommerce sets the
.components-custom-select-control__item
todisplay: flex
, whereas Gutenberg sets it todisplay: grid
. The PR that switched the component to usegrid
was this one, which merged back in October 2021: WordPress/gutenberg#35395I have very little knowledge of how the WC Blocks plugin is built, but as far as I can tell from a quick search of the repo, I imagine the bundled styles are being included somewhere around here:
woocommerce-blocks/bin/webpack-entries.js
Line 105 in 7f85c21
A couple of questions to hopefully help debug:
CustomSelectControl
component that also won't be compatible with the version shipped by WooCommerce.Thanks for taking a look! Let me know if you need any additional information or context.
The text was updated successfully, but these errors were encountered: