Home Forums WoodMart support forum single_add_to_cart_button :before & :after issues with WP Rocket Used CSS

single_add_to_cart_button :before & :after issues with WP Rocket Used CSS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #694999

    adf_david
    Participant

    Is there a reason why the add to cart button “single_add_to_cart_button” on single product page needs a :before & :after absolute styling? When using the optimize CSS feature with WP Rocket it’s creating an issue with where the :before absolute ends up covering the whole options section. When a user goes to select an option it acts like it’s selecting the add to cart button. Is it detrimental to hide these (display: none)?

    #695082

    Artem Temos
    Keymaster

    Hello,

    before and after are needed for the loader. after is the loader itself, before hides the standard text while the loader is running. If, for some reason, they go outside the button, it means the button has lost the relative position, which should always be there by default.

    Kind Regards

    #695227

    adf_david
    Participant

    So if we’re not using the preloader feature then making them display:none should be fine, correct?

    #695305

    Artem Temos
    Keymaster

    Yes, you can try to simply hide these elements if you don’t need to see the loader during AJAX add to cart.

Viewing 4 posts - 1 through 4 (of 4 total)