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 holds at most 20,000 characters. A save of a longer text shows "Your custom CSS can be up to 20,000 characters." and saves nothing.
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. After a save, a line under the field names each at-rule, function, or property the Live Link leaves out, such as "Not applied on the Live Link: @import, url()."
| What you write | On the Live Link |
|---|---|
Style rules, and @media, @supports, @container, @layer, @keyframes, or @-webkit-keyframes |
Applied, with the rules inside an at-rule checked the same way |
Any other at-rule, such as @import, @font-face, @charset, or @page |
The whole at-rule is left out |
A declaration whose value holds url() or calls src(), image(), image-set(), cross-fade(), element(), or expression(), including their -webkit- and -moz- forms |
The declaration is left out, and the rest of the rule applies |
| A selector or at-rule prelude that holds a URL or one of those functions | The whole rule is left out |
The properties behavior, -ms-behavior, and -moz-binding |
The declaration is left out |
| Comments | Left out, not named in the line |
| CSS with a syntax error, such as a missing brace | Dropped the way a browser drops it, not named in the line |
Pick a font from the "Choose a font" field instead of loading a web font. Each choice is a stack of fonts installed on the device that opens the page.
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 therefore 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
Every Live Link has the same markup, so these selectors work on every agreement.
| 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% |
.header |
The top band |
.header .title |
The agreement name, a <p> element |
.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 |
.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 |
#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 where the credit line shows |
.visible, .hidden |
Show or hide the text of a language when a visitor clicks a tab |
#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 above the text |
--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
These rules work as written in the "Custom CSS" field. This rule centers the agreement name and makes it larger.
.header .title {
text-align: center;
font-size: 32px;
}
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;
}
}