Developer Reference
All selectors available for styling the COOKR consent banner via the Scoped Banner Styling field. Any selector starting with #cookr- or .cookr- is permitted.
1. Base banner CSS (cookr.css defaults)2. Native accent styling (colour picker — active only when no preset/custom CSS is loaded)3. Scoped Banner Styling / preset CSS — applied last, always wins:hover and :focus rules in your preset to ensure consistent interactive behaviour.
@media queries · :has() · sibling combinators + ~ · selectors not starting with #cookr- or .cookr- · @import · url() · :root (except --cookr-* variables)
--cookr-accent on #cookr-banner, #cookr-reopen for any accent-driven elements#cookr-banner, #cookr-reopen { --cookr-accent: #00ff88; }:root — ensuring the preset variable wins over any system-level accent injection.
| Selector | Targets | Category |
|---|---|---|
| #cookr-banner | Outer banner container — background, border, shadow, border-radius | layout |
| .cookr-inner | Inner content wrapper — padding | layout |
| .cookr-title | Banner heading + info icon. Setting color here also affects the SVG icon via currentColor inheritance. | visual |
| .cookr-body | Description paragraph | visual |
| .cookr-links | Privacy / imprint link wrapper | layout |
| .cookr-links a | Individual privacy / imprint links | visual |
| Selector | Targets | Category |
|---|---|---|
| .cookr-buttons | Button group container — gap, layout | layout |
| .cookr-btn | Base class on all buttons — font, padding, border-radius | visual |
| #cookr-banner .cookr-btn-accept | Accept all button. Use the banner-scoped form to reliably beat base resets. | visual |
| #cookr-banner .cookr-btn-decline | Decline all button | visual |
| #cookr-banner .cookr-btn-save | Save selection button (preferences panel) | visual |
| .cookr-prefs-link | Open / close preferences link | visual |
| .cookr-btn-accept:hover .cookr-btn-accept:focus | Interactive states — define explicitly to avoid unexpected hover colour bleed from theme resets | state |
| .cookr-btn-decline:hover .cookr-btn-decline:focus | Interactive states for decline button | state |
| Selector | Targets | Category |
|---|---|---|
| .cookr-preferences | Collapsible preferences panel container | layout |
| .cookr-toggles | Toggle rows container | layout |
| .cookr-toggle-row | Single category toggle row | layout |
| .cookr-toggle-label | Category label and description text | visual |
| .cookr-switch | Toggle switch element | visual |
| .cookr-slider | Toggle slider pill — background colour driven by --cookr-accent when checked | visual |
| Selector | Targets | Category |
|---|---|---|
| #cookr-reopen | Minimised reopen button (pill toggle mark) | visual |
| .cookr-reopen-dot | Filled circle inside the reopen button. Set fill to match your accent colour. | visual |
:root — to ensure it wins over system-level injection:#cookr-banner, #cookr-reopen { --cookr-accent: #F5C418; }Only --cookr-* custom properties are permitted on :root.
currentColor.color on .cookr-title automatically changes the icon colour:.cookr-title { color: #00ff88; }