fix: WP-Admin CSS conflicts and add-to-cart redirect
- Fix CSS conflicts between WP-Admin and SPA (radio buttons, chart text) - Add Tailwind important selector scoped to #woonoow-admin-app - Remove overly aggressive inline SVG styles from Assets.php - Add targeted WordPress admin CSS overrides in index.css - Fix add-to-cart redirect to use woocommerce_add_to_cart_redirect filter - Let WooCommerce handle cart operations natively for proper session management - Remove duplicate tailwind.config.cjs
This commit is contained in:
@@ -76,6 +76,43 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
WordPress Admin Override Fixes
|
||||
These rules use high specificity + !important
|
||||
to override WordPress admin CSS conflicts
|
||||
============================================ */
|
||||
|
||||
/* Fix SVG icon styling - WordPress sets fill:currentColor on all SVGs */
|
||||
#woonoow-admin-app svg {
|
||||
fill: none !important;
|
||||
}
|
||||
|
||||
/* But allow explicit fill-current class to work for filled icons */
|
||||
#woonoow-admin-app svg.fill-current,
|
||||
#woonoow-admin-app .fill-current svg,
|
||||
#woonoow-admin-app [class*="fill-"] svg {
|
||||
fill: currentColor !important;
|
||||
}
|
||||
|
||||
/* Fix radio button indicator - WordPress overrides circle fill */
|
||||
#woonoow-admin-app [data-radix-radio-group-item] svg,
|
||||
#woonoow-admin-app [role="radio"] svg {
|
||||
fill: currentColor !important;
|
||||
}
|
||||
|
||||
/* Fix font-weight inheritance - prevent WordPress bold overrides */
|
||||
#woonoow-admin-app text,
|
||||
#woonoow-admin-app tspan {
|
||||
font-weight: inherit !important;
|
||||
}
|
||||
|
||||
/* Reset form element styling that WordPress overrides */
|
||||
#woonoow-admin-app input[type="radio"],
|
||||
#woonoow-admin-app input[type="checkbox"] {
|
||||
appearance: none !important;
|
||||
-webkit-appearance: none !important;
|
||||
}
|
||||
|
||||
/* Command palette input: remove native borders/shadows to match shadcn */
|
||||
.command-palette-search {
|
||||
border: none !important;
|
||||
|
||||
Reference in New Issue
Block a user