# Custom Classes

The **Custom Classes** setting in the **CCFBW** plugin allows users to customize the appearance of elements by adding **CSS classes.** This feature provides flexibility for users to style elements according to their website’s design.

<details>

<summary>What Are CSS Classes?</summary>

**CSS (Cascading Style Sheets)** classes are used to apply specific styles to HTML elements. By assigning a CSS class to an element, you can control its appearance, such as its color, size, or position, using the class name in your CSS stylesheet.

</details>

[Each element](https://docs.stylemixthemes.com/checkout-custom-fields-builder-for-woocommerce/checkout-builder-elements) within the Checkout Builder of **CCFBW**  has a field labeled **Custom Class Name in its settings**. Users can input the names of their custom CSS classes into this field to apply specific styles to those elements:

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2F7CYW3Qi91pECyaaz5E1v%2Fimage.png?alt=media&#x26;token=d6d0a016-267a-4abc-9819-3f350fb32459" alt=""><figcaption><p>Custom Classes setting</p></figcaption></figure>

{% hint style="info" %}
But these classes should be defined in your WordPress **beforehand**.
{% endhint %}

### How to define Custom (Additional) Classes on WordPress? <a href="#how-to-define-additional-classes-on-wordpress" id="how-to-define-additional-classes-on-wordpress"></a>

1. Follow **WordPress Dashboard > Appearance > Themes** and click on the **Customize** button in your active theme:

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2FYadppy5SLzN7qvlpRBlT%2Fimage.png?alt=media&#x26;token=9bdd58a1-6793-42ae-96bc-dee25a3f0405" alt=""><figcaption></figcaption></figure>

2. Open **Additional CSS** tab:

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2F9jAsp188o6ZXtS7JHKok%2Fimage.png?alt=media&#x26;token=971e2001-2082-4342-b0e2-2ff529f4b4eb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The location of the **Additional CSS** tab may vary based on your theme.
{% endhint %}

3. Define your CSS classes to the designated area and **Publish** the theme:

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2FVAkx1i7BMRFxazKXGfCC%2Fimage.png?alt=media&#x26;token=7c720165-4618-4886-bf49-e60c6d057001" alt=""><figcaption></figcaption></figure>

Here is an example of the CSS classes that hide buttons and change the color of the title of the number field

```css
.custom-style-for-number .woo-item__title span {
  color: red;
}

.custom-style-for-number .input-number-counter {
  display: none !important;
}
```

## How to Add Custom CSS to Elements?

1. Open the element settings and write down the CSS class names without dots (`.`) at the beginning and separate them with spaces. Here is the example input:

```
custom-style-for-number input-number-counter sample-class
```

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2FWUrcnLjsFOpX92YcYlmw%2Fimage.png?alt=media&#x26;token=9163c58d-5097-4304-a4cc-4728c84eda6b" alt=""><figcaption></figcaption></figure>

2. Here is the result of our changes:

{% tabs %}
{% tab title="BEFORE" %}

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2FcrmBjXOEm4UFxH0zHcxR%2Fimage.png?alt=media&#x26;token=359f3c1e-134e-4d6a-b88c-e88c691f3886" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="AFTER" %}

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2FduRyR1GxHkHWHoap5dlX%2Fimage.png?alt=media&#x26;token=eeee398a-8f52-4ece-91ac-e0a247c1a864" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

You can check the CSS classes via **Developer Tools** on your browser:

<figure><img src="https://1670878215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbK04jKOIhkmxYUGKxuyO%2Fuploads%2Fp0JNI3bv0HrarZf301GF%2Fimage.png?alt=media&#x26;token=12723a85-41a9-4616-9dbb-bd31cc35cc39" alt=""><figcaption></figcaption></figure>
