The Mine CMP banner is fully customizable with CSS. This article documents every CSS variable, ID, class, and data attribute exposed by the banner so developers can apply styling that goes beyond what is available in the CMP UI.
Customization methods
There are three ways to customize the banner's appearance:
Style Configuration — use the style object in your configuration for colors, fonts, and button styling. This is the simplest option and is managed through the CMP UI.
Custom CSS — provide additional CSS via the customCss banner property. This is appended after the generated style configuration and lets you apply rules that aren't exposed in the UI.
Direct CSS Targeting — write your own stylesheets that target the CMP's well-defined IDs and classes from elsewhere on your site.
How styling is applied
The CMP generates a base stylesheet from the style configuration object (colors, fonts, corner radius, etc.).
If customCss is provided in the banner config, it is appended after the generated CSS.
customCss takes precedence in case of conflicts via the standard CSS cascade.
customCss is not validated — invalid CSS is the customer's responsibility.
All configuration content is sanitized before use to prevent XSS attacks.
Content Security Policy
If your site uses a strict CSP, customCss requires either style-src: 'unsafe-inline' or a nonce-based approach for inline styles to apply.
Banner structure
The CMP uses consistent naming conventions for banner elements. All IDs and classes are prefixed with cmp- to avoid conflicts with host site styles.
Each layer follows a header → body → footer structure for predictable CSS targeting:
Header — contains the title
Body — contains the main content (the message on the first layer, the categories on the second layer)
Footer — contains the action buttons
The second layer adds an expandable hierarchy inside its body: categories → providers → cookies.
CSS variables
The CMP exposes CSS custom properties for easy theming. Override them on a specific layer or globally:
Every major element in each layer has a stable ID for direct targeting.
First layer
Element
ID
Description
Container
cmp-first-layer
Main first layer container
Header
cmp-first-layer-header
Header section
Body
cmp-first-layer-body
Body section
Footer
cmp-first-layer-footer
Footer section
Title
cmp-first-layer-title
Banner heading
Message
cmp-first-layer-message
Banner description text
Buttons
cmp-first-layer-buttons
Button group container
Deny All
cmp-first-layer-btn-deny-all
Deny all button
Customize
cmp-first-layer-btn-customize
Open preferences button
Accept All
cmp-first-layer-btn-accept-all
Accept all button
Allow Selection
cmp-first-layer-btn-allow-selection
Allow selection button (when firstLayerShowCategories is true)
Opt Out of Sales
cmp-first-layer-btn-opt-out-of-sales
CCPA opt-out button (when enabled)
Second layer
Element
ID
Description
Container
cmp-second-layer
Main second layer container
Header
cmp-second-layer-header
Header section
Body
cmp-second-layer-body
Body section
Footer
cmp-second-layer-footer
Footer section
Message
cmp-second-layer-message
Preferences panel content (rich text with title)
Consent Info
cmp-second-layer-consent-info
Previous consent info
Categories
cmp-second-layer-categories
Category list container
Deny All
cmp-second-layer-btn-deny-all
Deny all button
Save
cmp-second-layer-btn-save
Save / allow selection button
Accept All
cmp-second-layer-btn-accept-all
Accept all button
Categories and providers
Element
ID
Description
Necessary
cmp-category-necessary
Necessary cookies category
Preferences
cmp-category-preferences
Preferences cookies category
Analytics
cmp-category-analytics
Analytics cookies category
Marketing
cmp-category-marketing
Marketing cookies category
Unclassified
cmp-category-unclassified
Unclassified cookies category
Provider Item
cmp-provider-{name}
Provider container (e.g., cmp-provider-google)
CSS classes
Use classes when you want to target a group of similar elements rather than one specific element.
Layout
Class
Description
cmp-layer
Applied to all layer containers
cmp-first-layer
First layer specific class
cmp-second-layer
Second layer specific class
cmp-layout-bottom
Bottom layout positioning
cmp-layout-modal
Modal layout positioning
Structure
Class
Description
cmp-header
Header section
cmp-body
Body section
cmp-footer
Footer section
cmp-title
Title text
cmp-message
Message / description text
cmp-consent-info
Consent info section (second layer)
Buttons
Class
Description
cmp-button-group
Button container
cmp-btn
Base button class
cmp-btn-primary
Primary (filled) button style
cmp-btn-secondary
Secondary (outlined) button style
cmp-btn-accept-all
Accept all button (primary)
cmp-btn-deny-all
Deny all button (primary)
cmp-btn-customize
Customize button (secondary)
cmp-btn-allow-selection
Allow selection button (primary)
cmp-btn-opt-out-of-sales
Opt out of sales button (primary)
cmp-btn-save
Save preferences button
Primary buttons (Allow All, Deny All, Allow Selection) are filled. Secondary buttons (Customize) are outlined.
Categories
Class
Description
cmp-category-list
Category list container
cmp-category-item
Individual category container
cmp-category-header
Category header row
cmp-category-expand-btn
Category expand / collapse button
cmp-category-label
Category name label
cmp-category-toggle
Category checkbox (hidden input)
cmp-category-content
Category collapsible content
cmp-category-required
Applied to required categories
cmp-category-expanded
Applied when category is expanded
Toggle switch
Class
Description
cmp-toggle-wrapper
Toggle switch container
cmp-toggle-input
Toggle checkbox input
cmp-toggle-label
Toggle visual label
cmp-toggle-slider
Toggle slider knob
Providers
Class
Description
cmp-provider-list
Provider list container
cmp-provider-item
Individual provider container
cmp-provider-header
Provider header row
cmp-provider-expand-btn
Provider expand / collapse button
cmp-provider-name
Provider name text
cmp-provider-cookie-count
Provider cookie count badge
cmp-provider-content
Provider collapsible content
cmp-provider-expanded
Applied when provider is expanded
Cookies
Class
Description
cmp-cookie-list
Cookie list container
cmp-cookie-item
Individual cookie container
cmp-cookie-name
Cookie name text
cmp-cookie-description
Cookie description text
cmp-cookie-meta
Cookie metadata container
cmp-cookie-meta-row
Cookie metadata row
cmp-cookie-meta-label
Metadata label (e.g., "Max. storage duration")
cmp-cookie-meta-value
Metadata value
States
Class
Description
cmp-visible
Element is visible
cmp-hidden
Element is hidden
cmp-expanded
Expanded state
cmp-collapsed
Collapsed state
Data attributes
Data attributes are useful for selecting elements by semantic meaning rather than ID — particularly for providers and cookies, where the rendered name may not be predictable.