💸 Get more for your money each Wednesday with big savings on selected extensions. Shop this week's deals
Product Icon

Smart Coupons for WooCommerce

Trending
Boost sales and loyalty with gift cards, discounts, BOGO deals, store credits and more. The original, best-selling and advanced WooCommerce coupons plugin.

Tailwind prefix instead of parent selector

I love the fact that Smart Coupons is based on Tailwind, but I thought it would have made it easier to customize our coupon template by simply copying the coupon design template in our theme folder, but sadly it doesn’t work really well.

It’s simply because the Smart Coupons Tailwind styles are using the “important” feature with an ID (#sc-cc) which is applied on the parent of the coupon listing.

If I try to simply copy the “promotion” style in our theme, I don’t have access to the ID. I can copy the “print-coupons-default.php” template as well and remove the ID, but if I do that, the base styles of the plugin are completely removed which isn’t what I’m looking for either because I just want to start from the promotion.php template and change a few Tailwind classes here and there.

The ideal situation would have been for you to simply use the “prefix” option instead: https://tailwindcss.com/docs/configuration#prefix. That way, I can use Tailwind easily without fighting a parent container or too specific selectors.

Screenshots

Author

david_treblig

Current Status

Open

Last updated: December 18, 2022

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.