Skip to content

WooCommerce styling conflicts #188

@bacoords

Description

@bacoords

Describe the bug
I can add a few notes/fixes to this issue if you're interested and then if there's enough here to be actionable on, you could maybe load a Woo compatibility stylesheet if Woo is active.

  1. List Padding
    The default padding you add to lists has a number of 'exclude' selectors:
ol:where(:not([class*="wp-block"])), ol:where(.wp-block-list), ul:where(:not([class*="wp-block"])), ul:where(.wp-block-list) ....

If you wanted to exclude Woo's default blocks that use lists, you could also add a :not([class*="wc-block-"]) as well, since Woo tends to put lists inside a parent div.

  1. Checkout form radio/checkbox inputs
    They get funky due to the padding, so for now, I add this:
div[class*="wc-block-checkout"] input[type="radio"], div[class*="wc-block-checkout"] input[type="checkbox"] {
padding: unset;
}
  1. Label "width:100%" overrides Woo settings, most notably by brekaing the 'pill' layout in the Add to Cart + Options block for variable products. CSS Fix:
.wc-block-add-to-cart-with-options-variation-selector-attribute-options__pills label.wc-block-add-to-cart-with-options-variation-selector-attribute-options__pill{
width:auto;
}

To Reproduce
Steps to reproduce the behavior:

  1. On a Woo store, add the 'Product Categories List' block
  2. There's additional padding added.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions