Unverified

Name

Single Product Elementor styling coloured circle Radio Variation

About

Stylise the Single Product Variation Radio Buttons.

Language

CSS

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

Add this code to Code Snippets first; https://www.codesnippets.cloud/snippet/WebSquadron/Woocommerce-Single-Product-Variation-Radio And then add the CSS below to the 'Add to Cart' widget on the Single Product Template

Codevault

WebSquadron

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

12/03/2024

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

Single Product Elementor styling coloured circle Radio Variation

 
                    
1/* Hide the select dropdowns for product variations */
2.woocommerce div.product form.cart .variations select {
3display: none;
4}
5 
6/* Container for radio buttons and labels */
7.variation-changes-container {
8display: flex;
9flex-wrap: wrap; /* Allows items to wrap to next line as needed */
10gap: 15px; /* Space between items */
11}
12 
13/* Attribute Title alignment */
14.woocommerce div.product form.cart .variations th {
15text-align: left;
16align-items: center;
17}
18 
19/* Style for labels, indicating option colors */
20.variation-changes-container label {
21display: flex;
22align-items: center;
23margin-bottom: 0px; /* Adjust spacing between each option, if necessary */
24text-transform: capitalize; /* Converts text to uppercase */
25cursor: pointer;
26}
27 
28/* Style for radio buttons */
29.variation-changes-container input[type=radio] {
30appearance: none;
31margin-right: 7px; /* Space between circle and label text */
32width: 20px; height: 20px;
33border-radius: 50%; /* Circle */
34border: 2px solid #CCC; /* Light grey border by default */
35outline: none;
36background-color: #FFF; /* Default background for unspecified options */
37}
38 
39/* Style for checked radio buttons */
40.variation-changes-container input[type=radio]:checked {
41border-color: #000; /* Border color when selected */
42background-color: #000;
43}
44 
45/* Applying specific background colors for checked states */
46.variation-changes-container label.red input[type=radio] {
47background-color: #FF0050; /* Red background color when selected */
48border: 0px solid #FF0050;
49}
50 
51.variation-changes-container label.red input[type=radio]:checked {
52background-color: #FF0050; /* Red background color when selected */
53border: 4px solid #000;
54}
55 
56.variation-changes-container label.blue input[type=radio] {
57background-color: #0000FF; /* Red background color when selected */
58border: 0px solid #0000FF;
59}
60 
61.variation-changes-container label.blue input[type=radio]:checked {
62background-color: #0000FF; /* Blue background color when selected */
63border: 4px solid #000;
64}
65 
66/* Background color adjustments for add-to-cart and variations */
67.variation-changes-container .elementor-product-variable,
68.woocommerce div.product form.cart .variations th,
69.woocommerce div.product form.cart .variations td {
70background-color: #ffffff; /* Set background to white */
71}

0

Related Snippets

Please see some snippets below related to this snippet..

Elementor

AI Verified

0

Elementor Repeater Field Bullets

Added: 5 months ago

Last Updated: 5 months ago

Elementor

Unverified

1

Change image on hover - Elementor

Added: 1 year ago

Last Updated: 9 months ago

JQuery code snippet that changes image on hover

Elementor

AI Verified

0

Remove Google Fonts Elementor

Added: 1 year ago

Last Updated: 1 year ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

32

Remove Unused Javascript

Added: 1 year ago

Last Updated: 3 days ago

Remove Unused Javascript - and improve your Page Speed Insight Score

WooCommerce

Pro Verified

10

Deactivate some WooCommerce Checkout Fields

Added: 1 year ago

Last Updated: 2 weeks ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 8 months ago

Last Updated: 1 month ago

This can be used for any WordPress Builder to aid working with CSS Grids.