humanityco/cookie-compliance-agent-manual / site/skills/match-site-design
match-site-design
VerifiedMake a Cookie Compliance consent banner look like the site it sits on — derive colours, corner style and text size from the site's own CSS and check WCAG AA contrast, choose the banner font, and customise further with the supported CSS hooks. Use when asked to style, restyle, theme or "match the brand" of a cookie/consent banner, change its font, write custom CSS for it, or when a banner looks generic against the site.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 17.3 KB |
| index.html | other | 29.9 KB |
index.html
View on GitHub<!doctype html>
<!-- Generated by scripts/build-pages.mjs from skills/match-site-design/SKILL.md. Do not edit by hand. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Match the banner to the site — Cookie Compliance Agent Manual</title>
<meta name="description" content="Style a Cookie Compliance consent banner to match a site: derive colours, corners and text size from the site's own CSS and check WCAG AA contrast.">
<link rel="canonical" href="https://manual.hu-manity.co/skills/match-site-design/">
<link rel="alternate" type="text/markdown" href="/skills/match-site-design/SKILL.md" title="Raw markdown (for agents)">
<meta property="og:title" content="Match the banner to the site">
<meta property="og:description" content="Style a Cookie Compliance consent banner to match a site: derive colours, corners and text size from the site's own CSS and check WCAG AA contrast.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://manual.hu-manity.co/skills/match-site-design/">
<meta property="og:site_name" content="Cookie Compliance Agent Manual">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": [
"TechArticle",
"Article"
],
"headline": "Match the banner to the site",
"description": "Style a Cookie Compliance consent banner to match a site: derive colours, corners and text size from the site's own CSS and check WCAG AA contrast.",
"url": "https://manual.hu-manity.co/skills/match-site-design/",
"inLanguage": "en",
"publisher": {
"@type": "Organization",
"@id": "https://manual.hu-manity.co/#organization",
"name": "Hu-manity.co",
"url": "https://hu-manity.co/"
}
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://manual.hu-manity.co/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Match the banner to the site",
"item": "https://manual.hu-manity.co/skills/match-site-design/"
}
]
}
]
}
</script>
<link rel="stylesheet" href="/assets/site.css">
<script src="/assets/site.js" defer></script>
</head>
<body>
<a class="skip" href="#content">Skip to content</a>
<header class="site-header">
<div class="bar">
<a class="brand" href="/">Cookie Compliance <span>Agent Manual</span></a>
<nav aria-label="Main">
<ul>
<li><a href="/start/">Start</a></li>
<li><a href="/connect/">Connect</a></li>
<li><a href="/#skills" aria-current="true">Skills</a></li>
<li><a href="/#cookbooks">Cookbooks</a></li>
<li><a href="/gallery/">Gallery</a></li>
<li><a href="/llms.txt">For agents <span class="nav-note">(llms.txt)</span></a></li>
<li><a href="https://github.com/humanityco/cookie-compliance-agent-manual">GitHub</a></li>
</ul>
</nav>
</div>
</header>
<div class="layout">
<details class="sidebar" open>
<summary>All pages and this page's sections</summary>
<nav aria-label="Manual pages">
<h2>Get started</h2>
<ul>
<li><a href="/start/">Start here</a></li>
<li><a href="/connect/">Connect your AI assistant</a></li>
<li><a href="/prompts/">Prompts</a></li>
<li><a href="/platforms/">Platforms</a></li>
</ul>
<h2>Skills</h2>
<ul>
<li><a href="/skills/install-banner/">install-banner</a></li>
<li><a href="/skills/verify-install/">verify-install</a></li>
<li><a href="/skills/match-site-design/" aria-current="page">match-site-design</a>
<ul class="toc" aria-label="On this page">
<li><a href="#1-read-the-sites-own-colours--dont-guess">1. Read the site's own colours — don't guess</a></li>
<li><a href="#2-derive-a-design--dont-hand-write-hex-values">2. Derive a design — don't hand-write hex values</a></li>
<li><a href="#3-apply-it-in-the-one-place-it-works">3. Apply it in the one place it works</a></li>
<li><a href="#4-customise-beyond-design-settings">4. Customise beyond design settings</a></li>
<li><a href="#verified">Verified</a></li>
</ul></li>
<li><a href="/skills/configure-regions/">configure-regions</a></li>
</ul>
<h2>Cookbooks</h2>
<ul>
<li><a href="/cookbooks/plain-html/">plain-html</a></li>
<li><a href="/cookbooks/wordpress/">wordpress</a></li>
<li><a href="/cookbooks/nextjs/">nextjs</a></li>
<li><a href="/cookbooks/nuxt/">nuxt</a></li>
<li><a href="/cookbooks/astro/">astro</a></li>
<li><a href="/cookbooks/angular/">angular</a></li>
<li><a href="/cookbooks/vite/">vite</a></li>
<li><a href="/cookbooks/sveltekit/">sveltekit</a></li>
<li><a href="/cookbooks/gtm/">gtm</a></li>
<li><a href="/cookbooks/shopify/">shopify</a></li>
<li><a href="/cookbooks/hugo/">hugo</a></li>
<li><a href="/cookbooks/gatsby/">gatsby</a></li>
<li><a href="/cookbooks/docusaurus/">docusaurus</a></li>
<li><a href="/cookbooks/laravel/">laravel</a></li>
<li><a href="/cookbooks/django/">django</a></li>
<li><a href="/cookbooks/rails/">rails</a></li>
<li><a href="/cookbooks/drupal/">drupal</a></li>
<li><a href="/cookbooks/joomla/">joomla</a></li>
<li><a href="/cookbooks/ghost/">ghost</a></li>
<li><a href="/cookbooks/prestashop/">prestashop</a></li>
<li><a href="/cookbooks/magento/">magento</a></li>
<li><a href="/cookbooks/wix/">wix</a></li>
<li><a href="/cookbooks/squarespace/">squarespace</a></li>
<li><a href="/cookbooks/webflow/">webflow</a></li>
<li><a href="/cookbooks/framer/">framer</a></li>
<li><a href="/cookbooks/trackers/">trackers</a></li>
</ul>
<h2>Design gallery</h2>
<ul>
<li><a href="/gallery/">v1 banner designs</a></li>
<li><a href="/gallery/v2/">v2 banner designs</a></li>
</ul>
</nav>
</details>
<main id="content" class="doc">
<h1 id="match-the-banner-to-the-site">Match the banner to the site</h1>
<p class="page-meta">Skill <span aria-hidden="true">·</span> <a href="/skills/match-site-design/SKILL.md">View raw markdown (for agents)</a></p>
<p>MCP tool names below are written <code>demo.suggestDesign</code>; some clients list them as <code>demo_suggestDesign</code>.</p>
<h2 id="1-read-the-sites-own-colours--dont-guess">1. Read the site's own colours — don't guess <a class="anchor" href="#1-read-the-sites-own-colours--dont-guess" aria-label="Link to this section">#</a></h2>
<p>Look at the site's actual CSS (not the page as rendered): the brand/accent colour used on primary buttons or links, and the page or header background colour. If the site is visibly dark-themed, note that too. Guessed hex values produce a banner that clashes; measured ones don't.</p>
<h2 id="2-derive-a-design--dont-hand-write-hex-values">2. Derive a design — don't hand-write hex values <a class="anchor" href="#2-derive-a-design--dont-hand-write-hex-values" aria-label="Link to this section">#</a></h2>
<p>Call <code>demo.suggestDesign</code> with what you found:</p>
<div class="code"><pre tabindex="0"><code class="language-json">{"brand": {"brandColor": "#20c19e", "pageBackground": "#16202c", "cornerStyle": "rounded", "textScale": "medium"}}
</code></pre></div>
<p>It returns a <code>design.*</code> key set you can apply to a live app (<code>primaryColor</code>, <code>btnTextColor</code>, <code>bannerColor</code>, <code>textColor</code>, <code>headingColor</code>, <code>btnBorderRadius</code>, <code>textSize</code>, <code>headingSize</code> — it leaves out <code>spacingSize</code>, because a live app can't store it), the reasoning for each value, and a WCAG AA contrast check for banner body text, headings, and button labels — picking text colour by measured contrast against the two backgrounds, not by habit, and white button labels whenever white reaches 4.5:1 on the brand colour. Colours come back as 6-digit hex (<code>#RRGGBB</code>). On a New-engine (v2) app, <code>btnTextColor</code> can instead be set to <code>"auto"</code> when you apply the design (step 3): the banner then picks readable button and selected-level text from the banner's own text or background colour (4.5:1 or better on the button fill), and falls back to black or white. A Classic app needs a hex value, and <code>demo.suggestDesign</code> itself only accepts hex. If <code>contrastPassesAA</code> is false, do not override the colours it picked; that defeats the check that made it call <code>demo.suggestDesign</code> in the first place.</p>
<p>You can also pass <code>design</code> values you already have instead of <code>brand</code>, to validate them rather than derive new ones.</p>
<p><strong><code>bannerOpacity</code>:</strong> the widget default is <code>0.95</code>, so the contrast figures against the page background are approximate. If contrast has to be guaranteed, set <code>bannerOpacity: 1</code> in the same design object.</p>
<h2 id="3-apply-it-in-the-one-place-it-works">3. Apply it in the one place it works <a class="anchor" href="#3-apply-it-in-the-one-place-it-works" aria-label="Link to this section">#</a></h2>
<p><strong>A design set on the page does nothing to a real banner.</strong> <code>demo.suggestDesign</code>'s result says exactly where it applies:</p>
<div class="table-wrap" role="region" aria-label="Table" tabindex="0">
<table>
<thead>
<tr>
<th>Where</th>
<th>What happens</th>
</tr>
</thead>
<tbody><tr>
<td>A <strong>preview</strong> (<code>demo.generateSnippet</code>)</td>
<td>Applies exactly as given — a preview never fetches a configuration, so the page is the only source.</td>
</tr>
<tr>
<td>A <strong>real installed banner</strong></td>
<td>Does <strong>not</strong> apply from the page. The widget fetches the app's published configuration and merges it over the page's own <code>huOptions</code>, key by key — anything set locally is overwritten a moment after the banner first renders.</td>
</tr>
</tbody></table>
</div>
<p>To restyle a <strong>real</strong> banner:</p>
<ol>
<li><code>account.previewDesignChange</code> with <code>AppID</code> and the <code>design</code> object from step 2. Requires a signed-in connection on the account address <code>https://mcp.cookie-compliance.co/mcp/account</code>. Sign in: see <a href="/connect/"><code>connect.md</code></a>. Read the returned before/after: a field with <code>fromState: "not_set"</code> means the banner is currently on its built-in default, not that it was blank by choice — say so if you show this to the owner. The preview also reports <code>contrast</code> for body text and headings on the banner and button labels on the button, as the banner would look after the change, with a warning for any pair below WCAG AA (4.5:1; 3:1 for headings 24px or larger). For <code>btnTextColor: "auto"</code> it reports the colour the New banner would pick; on a Classic app <code>"auto"</code> is refused, because Classic shows white. The preview never refuses on contrast.</li>
<li>Show the before/after to the site owner, with any contrast warning, and get their agreement — this changes what every visitor sees, and the owner decides whether a low-contrast pair is acceptable. (Exception: <code>install-banner</code> in Autopilot applies it without asking on an app it created in that same install, which has no visitors yet.)</li>
<li><code>account.updateDesign</code> with the same <code>AppID</code>, the same <code>design</code> object, and the <code>previewToken</code> from step 1, within 10 minutes of the preview (<code>previewTokenExpiresAt</code> in its result; after that, preview again). It publishes by default — that is the normal path once the owner has agreed. A design change never asks visitors for their consent again (<code>consentReIssued: false</code>).</li>
</ol>
<p><strong><code>publish: false</code></strong> saves the change as a draft and leaves the live banner alone. Re-running the same call with <code>publish: true</code> publishes it (the same <code>previewToken</code>, so still within the 10 minutes; after that, preview again) — but publishing puts the app's <strong>whole</strong> draft live, including any edits saved in the dashboard since the last publish, not just this change. The result lists those other values in a warning; pass it on to the owner.</p>
<p><strong>Colours must be 6-digit hex (<code>#RRGGBB</code>).</strong> The banner ignores <code>#RGB</code>, <code>rgb()</code> and colour names and shows its default instead, so <code>account.previewDesignChange</code> refuses them for any colour you change. One exception: <code>bannerColor</code> accepts <code>rgb()</code>/<code>rgba()</code> with a warning, because the v2 banner shows white instead — prefer a hex <code>bannerColor</code> with <code>bannerOpacity</code>.</p>
<p>Do <strong>not</strong> add a <code>design</code> block to the snippet from <code>install.getSnippet</code>. It would style the banner for a fraction of a second and then revert, which looks like an intermittent bug rather than a setting.</p>
<p><strong>Free plan:</strong> the live banner keeps the defaults for <code>btnBorderRadius</code>, <code>revokeMarginX</code>, <code>revokeMarginY</code>, <code>delayDisplay</code>, <code>delayTime</code> and <code>levelsOrder</code>, whatever the app stores. Button corners, the reopen icon's position, a delay before the banner appears and the order of the level buttons change on paid plans only, so do not promise them to a Free-plan owner.</p>
<p><code>account.updateDesign</code> refuses any compliance-determinative field (blocking, consent categories, geolocation rules, consent mode, GPC, expiry) — those go through the <code>configure-regions</code> skill instead.</p>
<h2 id="4-customise-beyond-design-settings">4. Customise beyond design settings <a class="anchor" href="#4-customise-beyond-design-settings" aria-label="Link to this section">#</a></h2>
<p>Anything a design key covers — colours, text sizes, button corners, the font — goes through step 3. For the rest, use CSS in the <strong>site's own stylesheet</strong>. The banner is part of the page (no iframe, no shadow root), so the site's CSS reaches it. Never put CSS or a <code>design</code> block in the install snippet.</p>
<p>The banner comes in two engines, set per site: <strong>Classic</strong> (v1) and <strong>New</strong> (v2). Everything in 4.1–4.5 works on both; where an engine differs, the text says so. Only 4.6 is engine-specific.</p>
<h3 id="41-the-font-designfontfamily">4.1 The font: <code>design.fontFamily</code> <a class="anchor" href="#41-the-font-designfontfamily" aria-label="Link to this section">#</a></h3>
<p>Set it like any other design key (<code>account.previewDesignChange</code>, then <code>account.updateDesign</code>). The owner sees it in the dashboard under Configuration → Design → Typography → <strong>Font</strong>. Available on every plan.</p>
<div class="table-wrap" role="region" aria-label="Table" tabindex="0">
<table>
<thead>
<tr>
<th>Value</th>
<th>Font</th>
</tr>
</thead>
<tbody><tr>
<td>not set</td>
<td>the banner default: <strong>Arial on Classic</strong>; <strong>the website's own font on New</strong>. On both engines the notice over a blocked video or map uses the website's font for its text and Arial for its button</td>
</tr>
<tr>
<td><code>"site"</code></td>
<td>the website's own font</td>
</tr>
<tr>
<td><code>"sans-serif"</code></td>
<td>Arial, or the closest plain font on the device (the Classic default look)</td>
</tr>
<tr>
<td><code>"serif"</code></td>
<td>Georgia, or Times New Roman</td>
</tr>
<tr>
<td><code>"system"</code></td>
<td>the device's own interface font (San Francisco on Apple, Segoe UI on Windows, Roboto on Android)</td>
</tr>
</tbody></table>
</div>
<p><code>null</code> goes back to the banner default. A named font such as <code>"Open Sans"</code> is not a value: <code>account.previewDesignChange</code> refuses it — use 4.5 instead. None of the four downloads a font: <code>"site"</code> uses the font the page already has, the others are fonts already on the device.</p>
<h3 id="42-where-the-css-goes">4.2 Where the CSS goes <a class="anchor" href="#42-where-the-css-goes" aria-label="Link to this section">#</a></h3>
<div class="table-wrap" role="region" aria-label="Table" tabindex="0">
<table>
<thead>
<tr>
<th>Platform</th>
<th>Location</th>
</tr>
</thead>
<tbody><tr>
<td>WordPress, classic theme</td>
<td>Appearance → Customize → <strong>Additional CSS</strong></td>
</tr>
<tr>
<td>WordPress, block theme</td>
<td>Appearance → Editor → Styles → ⋮ → <strong>Additional CSS</strong></td>
</tr>
<tr>
<td>WordPress, child theme</td>
<td>the theme's <code>style.css</code></td>
</tr>
<tr>
<td>Any other site</td>
<td>the site's main stylesheet, or a <code><style></code> in <code><head></code></td>
</tr>
</tbody></table>
</div>
<p>The banner adds its own stylesheet at the end of <code><head></code>, so a rule exactly as specific as the banner's loses from <code><head></code>. The rule in 4.3 is chosen to win from anywhere.</p>
<h3 id="43-supported-hooks--and-how-to-make-a-rule-win">4.3 Supported hooks — and how to make a rule win <a class="anchor" href="#43-supported-hooks--and-how-to-make-a-rule-win" aria-label="Link to this section">#</a></h3>
<p>These names are the same on both engines and are kept stable on purpose. Style only these if the CSS must keep working.</p>
<div class="table-wrap" role="region" aria-label="Table" tabindex="0">
<table>
<thead>
<tr>
<th>Hook</th>
<th>What it is</th>
</tr>
</thead>
<tbody><tr>
<td><code>#hu</code></td>
<td>the banner</td>
</tr>
<tr>
<td><code>#hu .hu-heading</code></td>
<td>the banner heading — on Classic also the headings in the banner's other panels (preferences, categories, levels)</td>
</tr>
<tr>
<td><code>#hu .hu-body</code></td>
<td>the banner message — on Classic also the text in those panels</td>
</tr>
<tr>
<td><code>#hu .hu-site-url</code></td>
<td>the site name in the top row (shown only when the toolbar is on; not shown on the New banner's Compact style)</td>
</tr>
<tr>
<td><code>#hu-revoke</code>, <code>#hu-revoke .hu-revoke-button</code></td>
<td>the round icon that reopens the banner after a choice</td>
</tr>
<tr>
<td><code>#hu-passive</code>, <code>#hu-passive .hu-passive-heading</code>, <code>#hu-passive .hu-passive-body</code></td>
<td>the notice shown when the banner honours a Global Privacy Control signal</td>
</tr>
<tr>
<td><code>.hu-iframe-overlay</code>, <code>.hu-iframe-overlay .hu-iframe-content</code>, <code>.hu-iframe-overlay .hu-btn</code></td>
<td>the notice over a blocked video or map, its text, and its button</td>
</tr>
<tr>
<td><code>#hu.hu-position-top</code> / <code>-bottom</code> / <code>-left</code> / <code>-right</code> / <code>-center</code>, <code>#hu.hu-display-floating</code> / <code>-fixed</code></td>
<td>the banner's position and display type from its design</td>
</tr>
<tr>
<td><code>body.hu-visible</code></td>
<td>the banner is showing</td>
</tr>
<tr>
<td><code>body.hu-not-set</code></td>
<td>the visitor has not chosen yet</td>
</tr>
<tr>
<td><code>body.hu-cookies-accepted</code></td>
<td>a consent record exists — the visitor's choice (any choice, including the most private one), or one applied automatically from a Global Privacy Control signal</td>
</tr>
</tbody></table>
</div>
<p><strong>Start every selector with <code>body #hu</code></strong> — or <code>body</code> plus the part's own root: <code>body #hu-revoke …</code>, <code>body #hu-passive …</code>, <code>body .hu-iframe-overlay …</code>. The banner's rules sit under its root id, and the extra <code>body</code> outweighs them from <code><head></code> or <code><body></code>. A class alone (<code>.hu-heading</code>) or a tag selector (<code>#hu h2</code>) loses.</p>
<ul>
<li><strong><code>#hu</code> reaches only the banner.</strong> The reopen icon, the Global Privacy Control notice and the blocked-video notice are separate roots; write a rule for each one you mean.</li>
<li><strong>Size, spacing and alignment of the heading and message can need <code>!important</code>.</strong> A few of the banner's layout rules are heavier (the heading's size and spacing on Classic; alignment and spacing on New's Compact style). For sizes, prefer the design keys.</li>
<li><strong>Message colour and size: use the design keys</strong> (<code>textColor</code>, <code>textSize</code>), not CSS. On Classic the message text inside <code>.hu-body</code> sets its own colour and size, so a rule on <code>.hu-body</code> may not change what the visitor sees, even with <code>!important</code>.</li>
<li><strong>A site theme rule with <code>!important</code></strong> (for example <code>h2 { color: green !important; }</code>) beats the banner. Only the site's own, more specific <code>!important</code> fixes it: <code>body #hu .hu-heading { color: #434f58 !important; }</code>.</li>
<li><strong>Keep <code>#hu</code> in front of any body class.</strong> <code>.hu-cookies-accepted .x</code> alone also matches things outside the banner.</li>
</ul>
<div class="code"><pre tabindex="0"><code class="language-css">body #hu .hu-heading { font-weight: 400; }
body #hu .hu-heading { color: #222; }
body #hu-revoke .hu-revoke-button { background: #c00; }
body #hu-passive .hu-passive-heading { color: #c00; }
</code></pre></div>
<h3 id="44-colours-and-sizes-variables-on-the-root">4.4 Colours and sizes: variables on the root <a class="anchor" href="#44-colours-and-sizes-variables-on-the-root" aria-label="Link to this section">#</a></h3>
<p>Every colour and size design key is also a CSS variable named <code>--hu-<key></code> (<code>--hu-primaryColor</code>, <code>--hu-textColor</code>, <code>--hu-bannerColor</code>, <code>--hu-headingSize</code>, <code>--hu-textSize</code>, <code>--hu-btnBorderRadius</code>, …). Set it <strong>on a root</strong>:</p>
<div class="code"><pre tabindex="0"><code class="language-css">#hu { --hu-primaryColor: #c00; --hu-btnColor: #c00; } /* the banner, buttons included */
#hu, #hu-revoke, #hu-passive, .hu-iframe-overlay { --hu-primaryColor: #c00; --hu-btnColor: #c00; } /* every part */
</code></pre></div>
<p><strong>To recolour buttons, set both <code>--hu-primaryColor</code> and <code>--hu-btnColor</code>.</strong> On Classic, <code>--hu-primaryColor</code> on <code>#hu</code> recolours only the link-style buttons; the filled buttons follow <code>--hu-btnColor</code>. Set both to recolour the buttons on either engine.</p>
<p>Not on <code>:root</code> or <code>html</code>: the banner writes its own values directly on the <code><html></code> element, and those beat a stylesheet rule there. A variable set on <code>#hu</code> does not reach the other three parts. Your <code>--hu-bannerColor</code> replaces the banner's background opacity with a solid colour.</p>
<p>Prefer the design keys (step 3) when one exists: a colour changed by CSS is not covered by the contrast check, so check it yourself (4.5:1 for text).</p>
<h3 id="45-a-font-that-is-not-one-of-the-four">4.5 A font that is not one of the four <a class="anchor" href="#45-a-font-that-is-not-one-of-the-four" aria-label="Link to this section">#</a></h3>
<p><strong>To use your own font, leave <code>fontFamily</code> unset (the banner default), then add this line to the site's stylesheet:</strong></p>
<div class="code"><pre tabindex="0"><code class="language-css">body #hu, body #hu .hu-btn, body #hu-passive, body #hu-revoke, body .hu-iframe-overlay .hu-btn { font-family: "Your Font", sans-serif; }
</code></pre></div>
<ul>
<li>Replace <code>"Your Font"</code> with a font <strong>the site already loads</strong>. Adding a new font service only for the banner adds a third-party request on every page.</li>
<li>The line covers both engines: the banner, its buttons, the Global Privacy Control notice, the reopen icon and the blocked-video notice's button. That notice's text keeps the page's own font.</li>
<li>Do not combine the line with a <code>fontFamily</code> setting: on Classic the setting wins and the line has no effect; on New the result is mixed fonts. Leave <code>fontFamily</code> unset (send <code>null</code> to clear it) when you use the line.</li>
<li>Check in a new private window, and clear the cache of any caching or optimisation plugin. A published design change, such as unsetting <code>fontFamily</code>, can take up to an hour to reach returning visitors.</li>
</ul>
<h3 id="46-not-supported-engine-specific-names-may-change">4.6 Not supported: engine-specific names (may change) <a class="anchor" href="#46-not-supported-engine-specific-names-may-change" aria-label="Link to this section">#</a></h3>
<p>Everything not listed in 4.3 — the level buttons, the Customize panel, categories, links, toolbar icons — has different names on Classic and New, and <strong>may change without notice</strong>. CSS on these can stop working after an update. Use them only when the owner accepts that, and check the engine first: with the banner open (from the reopen icon, or in a new private window), New has <code>#hu .hu-panel</code> in the page and Classic has <code>#hu-cookies-content</code>. A script address containing <code>/v2/</code> is a second check (a script-combining optimizer can remove that tag from the page source).</p>
<div class="table-wrap" role="region" aria-label="Table" tabindex="0">
<table>
<thead>
<tr>
<th>Want (New only — may change)</th>
<th>CSS</th>
</tr>
</thead>
<tbody><tr>
<td>Square corners on the level buttons only</td>
<td><code>body #hu .hu-levels .hu-level { border-radius: 4px; }</code></td>
</tr>
<tr>
<td>Centred message on the Compact style</td>
<td><code>#hu .hu-body { text-align: center !important; }</code></td>
</tr>
<tr>
<td>Hide the site name, icons stay in place</td>
<td><code>body #hu .hu-site-url { visibility: hidden; }</code></td>
</tr>
<tr>
<td>Lift the banner above a sticky footer or chat bar (on phones every banner is a bottom band)</td>
<td><code>body #hu.hu-position-bottom { bottom: 80px; } @media (max-width: 600px) { body #hu.hu-wrapper { bottom: 80px; } }</code> — never plain <code>body #hu { bottom: … }</code>: on a top or centre banner it stretches an invisible box over the page that blocks clicks</td>
</tr>
<tr>
<td>Recolour the keyboard focus ring (on by default) on all four parts</td>
<td><code>body #hu :focus-visible, body #hu .hu-level:focus-within, body #hu-revoke :focus-visible, body #hu-passive :focus-visible, body .hu-iframe-overlay :focus-visible { outline-color: #005fcc; }</code></td>
</tr>
</tbody></table>
</div>
<p>On New, <code>#hu .hu-btn</code> matches only the Customize button; old Classic CSS mostly matches nothing there.</p>
<h3 id="47-what-css-must-never-do">4.7 What CSS must never do <a class="anchor" href="#47-what-css-must-never-do" aria-label="Link to this section">#</a></h3>
<p>The banner exists so a visitor can choose. Never use CSS to <strong>hide, shrink, cover or fade out</strong>: any consent choice (the level buttons, the category switches), the way to refuse (the most private level, and Save on Classic), Customize, the close button, the privacy-policy and other policy links, or the Global Privacy Control notice. No <code>display: none</code>, <code>visibility: hidden</code>, <code>opacity: 0</code>, <code>pointer-events: none</code>, off-screen positions or tiny sizes on any of them. Keeping the choices equally easy to see and use is the site owner's legal duty, and a choice a visitor cannot reach is a choice they cannot make. Do not remove the keyboard focus ring (<code>outline: none</code>); recolour it.</p>
<p>This is technical guidance on using the banner, not legal advice.</p>
<h2 id="verified">Verified <a class="anchor" href="#verified" aria-label="Link to this section">#</a></h2>
<p><code>demo.suggestDesign</code>, <code>account.previewDesignChange</code> and <code>account.updateDesign</code> were called live on a real test site on 2026-09-29, confirming: the derived key set and contrast report shape above, that an unset field previews as <code>fromState: "not_set"</code> rather than a false before-value, and that <code>publish: false</code> saves a draft with <code>consentReIssued: false</code> and does not touch the live banner. Publishing a saved draft by re-running with <code>publish: true</code>, the colour-format refusal and the preview's contrast report came later and were not part of that test.</p>
<p>The hooks in 4.3 are pinned by an automated test on each engine, so renaming one fails a test instead of breaking a site's CSS. On both engines a real-browser test places the CSS in <code><head></code>, where WordPress prints Additional CSS — the harder spot, because a rule there loses any tie that the same rule at the end of <code><body></code> would win — and confirms that <code>body #hu .hu-heading { color }</code>, a colour variable on the root, and the font line in 4.5 apply; on Classic it also confirms that filled buttons follow <code>--hu-btnColor</code>. The recipes in 4.6 were checked in a real browser against the New engine on 2026-10-13. <code>btnTextColor: "auto"</code> was checked in a real browser on the New engine's preview on 2026-11-16 (the stock teal button showed black text); applying it to a live app with <code>account.updateDesign</code> was not part of that check.</p>
</main>
</div>
<footer class="site-footer">
<p>Cookie Compliance is a product of <a href="https://hu-manity.co">Hu-manity.co</a>.
Product: <a href="https://cookie-compliance.co/">Cookie Compliance</a> · <a href="https://cookie-compliance.co/mcp/">MCP server</a>.
Source and contributions: <a href="https://github.com/humanityco/cookie-compliance-agent-manual">github.com/humanityco/cookie-compliance-agent-manual</a>.</p>
</footer>
</body>
</html>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |