-
Notifications
You must be signed in to change notification settings - Fork 860
Override WooCommerce styles #1106
Comments
Hi. I have limited experience with WooCommerce myself. But my gut feeling says @colin-marshall might have some insight and knowledge on this topic? |
@asmundsollihogda WooCommerce css should be loading before |
@colin-marshall Hi! Did not really find a good way to do this (I'm a novice in WooCommerce) so decided to disable all WC stylesheets with a line in functions.php. |
There's no need to do that. Use your browser's inspector tool to find the exact classes you need to to target to make changes on specific elements. |
The problem is that my overriding styles only work when I add |
@asmundsollihogda did you verify that the WooCommerce css file is being loaded before the |
@colin-marshall It's probably loading after app.css... and thats where the problem lays. |
@asmundsollihogda view source to find out for sure. |
@colin-marshall It loads after the footer:
|
@asmundsollihogda that's javascript, not CSS. Look in the |
@asmundsollihogda I tested this and the WooCommerce CSS loads before I'm going to close this. If you still have questions, feel free to reopen. |
@colin-marshall I've been testing this some more now, and it seems that even if my app.css correctly loads after the woocommerce-stylesheets, their styles gets a higher priority. I've made a .button class directly in the app.scss file to illustrate what happens and attached two screenshots. Thank you for your assistance. |
@asmundsollihogda as I stated in my last post you are using the wrong selectors to override. The inspector tells you exactly what selectors to use to override. Look from the top down at the selectors in black. Most CSS rules for the button will be overridden with |
@colin-marshall You are completely right. Thank you so much for helping me along. Have a great day! |
Takk Ole Fredrik for a truly great FoundationPress!
What would be the best way prioritise FoundationPress styles over the default WooCommerce styles? I would like to base my design on as much original WC styles as possible, but add alterations.
The text was updated successfully, but these errors were encountered: