Style the Compliance Kits with your own CSS
Every compliance kit in TermsFeed AutoTerms except Cookie Consent prints fixed CSS classes, and the 2 notice bars print inside 4 containers with fixed IDs. Use them in the "Additional CSS" field of a kit, in your WordPress theme stylesheet, or in a front-end test. The plugin prints the "Additional CSS" field after the styles of the color and font fields, so a rule of yours with the same selector overrides them.
The consent banner of the Cookie Consent kit comes from TermsFeed Free Cookie Consent 4.2.0. Look up its ids and classes in Free Cookie Consent DOM and CSS Reference.
Style fields of the notice and Endorsements kits
The Cookie Notice, Update Notices, and Endorsements kits share these style fields, and an empty or "default" field does not print a rule.
| Field | Values | Default |
|---|---|---|
| "Background color" | A hex color, such as #162942 |
Empty |
| "Font" | "default", "Arial, sans-serif", "Georgia, serif", or "custom..." with any text without HTML tags | "default" |
| "Font size" | "default", "12px", "13px", "14px", "15px", "16px", or "custom..." with any text without HTML tags, such as 1rem |
"default" |
| "Text color" | A hex color | Empty |
| "Links color" | A hex color | Empty |
| "Additional CSS" | CSS rules, saved only by an account with the WordPress unfiltered_html capability |
Empty |
The Links to Legal Pages kit starts with a white background, black links, and centered text instead. Look up its fields in Add Legal Links to the WordPress Footer.
The notice bar containers
Each combination of "Announcement bar position" and "Announcement bar type" is a <div> with a fixed ID, printed only when a kit or a wpautoterms_container callback puts something in it. The Update Notices bar comes first when both bars sit in the same container.
| Position and type | Where the container appears | Container ID |
|---|---|---|
| "top" and "static" | At the start of the page, above the theme header, pushing the page down | #wpautoterms-top-static-container |
| "top" and "fixed" | At the top edge of the window, over the page | #wpautoterms-top-fixed-container |
| "bottom" and "static" | At the end of the page, below the theme footer | #wpautoterms-bottom-static-container |
| "bottom" and "fixed" | At the bottom edge of the window, over the page | #wpautoterms-bottom-fixed-container |
A container holds only kit output unless your code adds to it. Print your own markup with the wpautoterms_container action in TermsFeed AutoTerms Action Hooks and Filters.
Cookie Notice selectors
The "Close" link of both notice bars carries .wpautoterms-notice-close, so put .wpautoterms-cookies-notice before it to style the Cookie Notice link alone.
| Selector | Element | Style fields it receives |
|---|---|---|
.wpautoterms-cookies-notice |
The Cookie Notice bar | "Font", "Font size", "Text color", "Background color" |
.wpautoterms-cookies-notice a |
The links in the message and the "Close" link | "Font", "Font size", "Links color" |
.wpautoterms-cookies-notice .wpautoterms-notice-close |
The "Close" link alone | None of its own |
This rule adds space around the message.
.wpautoterms-cookies-notice {
padding: 12px 16px;
}
Update Notices selectors
Put .wpautoterms-update-notice before the shared .wpautoterms-notice-close to style the Update Notices link alone.
| Selector | Element | Style fields it receives |
|---|---|---|
#wpautoterms-update-notice-placeholder |
The wrapper around the Update Notices messages | None |
.wpautoterms-update-notice |
One Update Notices message | "Font", "Font size", "Text color", "Background color" |
.wpautoterms-update-notice a |
The links in a message and its "Close" link | "Font", "Font size", "Links color" |
.wpautoterms-update-notice .wpautoterms-notice-close |
The "Close" link in a message alone | None of its own |
This rule adds space around each message.
.wpautoterms-update-notice {
padding: 8px 16px;
}
Links to Legal Pages selectors
The row of footer legal links prints where the theme calls wp_footer(), outside the notice bar containers. In most themes it sits below the theme footer and above a "bottom" and "static" notice bar. The "Update cookies preferences" link of the Cookie Consent kit prints right after it.
| Selector | Element | Style fields it receives |
|---|---|---|
.wpautoterms-footer |
The row of footer legal links | "Background color", "Text alignment" |
.wpautoterms-footer .separator |
The separator between 2 links | "Text color", "Font", "Font size" |
.wpautoterms-footer a |
One footer legal link | "Links color", "Font", "Font size" |
The row underlines a link on hover by default. A row with 2 legal pages and the default separator prints this HTML.
<div class="wpautoterms-footer"><p>
<a href="https://example.com/termsfeed/privacy-policy/">Privacy Policy</a><span class="separator"> - </span><a href="https://example.com/termsfeed/terms-and-conditions/">Terms and Conditions</a>
</p></div>
This rule adds space above and below the row.
.wpautoterms-footer {
padding: 16px 0;
}
Endorsements selectors
The Endorsements box prints inside the content of a single blog post. Its styles print in a <style> element right before it while a style field or "Additional CSS" holds a value.
| Selector | Element | Style fields it receives |
|---|---|---|
.wpautoterms-endorsements |
The disclosure box | "Font", "Font size", "Text color", "Background color" |
.wpautoterms-endorsements a |
The links in the box | "Font", "Font size", "Links color" |
This rule draws a colored border and adds space around the text.
.wpautoterms-endorsements {
border-left: 4px solid #1a54a9;
padding: 12px 16px;
}