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.

Last updated