> For the complete documentation index, see [llms.txt](https://design-packs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design-packs.gitbook.io/docs/fundamentals/global-section-settings/custom-classes-setting.md).

# Custom Classes Setting

### Overview

The Custom Classes setting allows you to add your own CSS classes to the section wrapper for custom styling and functionality. This is an advanced feature intended for developers or users familiar with CSS.

### Basic Usage

#### Adding Classes

1. Enter class names in the "Custom classes" field
2. Separate multiple classes with spaces
3. Classes will be added to the section's main wrapper div

Example:

```
my-custom-class another-class special-theme
```

### Class Targeting

Your custom classes will be added to the section wrapper with this structure:

```
<section class="DP--[section-id] dsgn-pck__banner-video dsgn-pck__section your-custom-classes">
```

#### CSS Targeting Example

```
/* Target the section with a custom class */
.my-custom-class {
  /* Your styles here */
}

/* Target specific elements within your custom class */
.my-custom-class .dsgn-pck__content {
  /* Styles for content area */
}
```

### Best Practices

1. **Naming Conventions**
   * Use descriptive, meaningful class names
   * Follow a consistent naming pattern
   * Avoid generic names that might conflict
   * Consider using prefixes (e.g., `my-theme-`)
2. **Specificity**
   * Be specific enough to avoid conflicts
   * Use the section's built-in classes as context
   * Don't override core functionality
3. **Documentation**
   * Comment your custom CSS
   * Document class purposes
   * Keep track of dependencies

### Examples

#### Theme Variation

```
/* Add class: theme-variant-1 */
.theme-variant-1 .dsgn-pck__content {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

.theme-variant-1 .dsgn-pck__heading {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
```

### Troubleshooting

1. **Classes Not Applying**
   * Verify class names are spelled correctly
   * Check CSS specificity
   * Inspect element to confirm class is added
2. **Styles Conflicting**
   * Use more specific selectors
   * Check for duplicate classes

Need help? Contact our support team at <support@design-packs.com> for assistance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://design-packs.gitbook.io/docs/fundamentals/global-section-settings/custom-classes-setting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
