Style the Live Link with your own CSS
Add your own CSS to the Live Link with the "Custom CSS" field on the Appearance screen of TermsFeed Agreements & Policies. Your rules show on the Live Link and in its previews, but not in the HTML code or the download files.
Custom CSS length limit
The field keeps the first 20,000 characters you paste.
CSS the Live Link does not apply
The Live Link does not apply any part of your Custom CSS that loads a file or runs code, so background images, web fonts, and imported stylesheets do not work. The field keeps the text you typed, and the Live Link drops comments and CSS with a syntax error without a note. After a save, a note under the field names any other rule the Live Link leaves out, such as "Not applied on the Live Link: @import, url()."
Pick a font from the "Choose a font" field instead of loading a web font.
How your Custom CSS overrides the built-in styles
Your Custom CSS comes after the built-in styles of the Live Link, so a rule of yours with the same specificity overrides the built-in rule. The built-in rules use element and class selectors, plus body[data-theme="…"] and body[data-font="…"] for the theme and the font. A plain body rule does not override the colors of the Dark theme, or of the Auto theme on a device set to dark mode.
A Custom theme color, content width, or line spacing set on the Appearance screen overrides the same --ll-* property in your body { … } rule. Add !important to your declaration, or leave that field at its default. Find why a rule does not apply in Custom CSS Not Applied to the Policy Page.
Selectors on the Live Link page
| Selector | Element |
|---|---|
body |
The page; carries data-theme (auto, light, dark, or custom) and data-font (helvetica, georgia, or system) |
.page |
The wrapper around every band |
.wrapper |
The text column inside each band, max-width: var(--ll-width) and width: 90% |
.translations-list-container |
The band of language tabs, present only for more than one language |
.translations-list |
The <ul> of language tabs |
.translations-list-item |
One tab, an <li> that carries the language code as a class too |
.translations-list-item a.tab-link |
The tab link; .active on the language shown, .inactive on the others |
.translations-content-container |
The band that holds the text, with a top border under the language tabs |
.translations-content-item |
The text of one language, a <div> with .tab-content, the language code as a class and id, and .visible or .hidden |
.translations-content-item h1 to h4 |
The headings of the agreement text; the text opens on its title in an <h1> |
.agreement-site |
The line under the title that names your website or app, a <p> element |
#contents |
The "Contents" heading of the table of contents, an <h2> |
.toc-list |
The table of contents, a <ul>, with a nested .toc-list for each lower level |
.heading-anchor |
The "#" link inside a heading, with aria-label="Permalink to this section" |
a[rel~="nofollow"] |
A link to another website, marked rel="external nofollow noopener" |
.footer-container |
The band of the credit line, present only while the page shows a credit line |
#contents, .toc-list, and .heading-anchor exist only while their switches on the Appearance screen are on. While either switch is on, each section heading carries an id built from its text, such as id="interpretation-and-definitions".
CSS custom properties of the Live Link
These properties on body set every color, font, size, and width on the page, so overriding one changes everything that uses it. Set text and heading sizes, which have no Appearance field, with the --ll-fs-* properties.
| Property | Light (default) | Dark | What it sets |
|---|---|---|---|
--ll-bg |
#FFFFFF |
#1F2937 |
Page background |
--ll-text |
#000 |
#E5E7EB |
Text color |
--ll-link |
#000 |
#FFFFFF |
Links without rel="nofollow": the table of contents, heading anchors, links to termsfeed.com, inactive language tabs |
--ll-link-external |
#0452a5 |
#93C5FD |
Links to other websites, underlined |
--ll-tab-bg |
#334055 |
#E5E7EB |
Background of the active language tab |
--ll-tab-text |
#FFFFFF |
#1F2937 |
Text of the active language tab |
--ll-border |
#EEE |
#374151 |
The line under the language tabs |
--ll-font |
'Helvetica Neue', Helvetica, Arial, sans-serif |
Same | Font of the page |
--ll-fs-body |
16px |
Same | Size of text and lists |
--ll-fs-h1 to --ll-fs-h4 |
40px, 32px, 24px, 20px |
Same | Size of each heading level |
--ll-width |
1280px |
Same | Maximum width of the text column |
--ll-lh |
1.75 |
Same | Line height, as a multiple of the text size |
The Auto theme applies the Dark values inside @media (prefers-color-scheme: dark). Headings take 80% of their size on screens 600 pixels wide or less.
Custom CSS examples
This rule centers the agreement title and the line that names your website or app.
.translations-content-item h1,
.agreement-site {
text-align: center;
}
This rule gives links to other websites a brand color in the Light theme and a lighter one in the Dark theme.
body {
--ll-link-external: #1a54a9;
}
body[data-theme="dark"] {
--ll-link-external: #9cc2ff;
}
This rule hides the language tabs and the "#" heading anchors when a visitor prints the page.
@media print {
.translations-list-container,
.heading-anchor {
display: none;
}
}