Legal Center Styling Contract
Your legal center's look is set in the management portal (Organization > Legal Center): a brand color, fonts, colors, a starter theme and, under Advanced, per-element colors. When you need more, add Custom CSS on the Content tab.
Custom CSS should only rely on the names on this page: the --tc-* CSS variables, the tc- class names and the part names. They are a versioned public API. We keep them working when we change the legal center's design; anything else in the page (other class names, element structure, Tailwind utilities) can change in any release.
Versions
The current contract is version 1. The legal center root element carries it:
<div class="tc-legal-center tc-template-sidebar" data-tc-contract="1" data-tc-scheme="light" data-tc-view="document" data-tc-template="sidebar">
- Additions (a new variable, class or part) don't change the version.
- Renames and removals need a new version. The old name keeps working for at least one release after the new one ships, and both are listed here until then.
- Changes are announced in the Changelog.
Where your CSS applies
Your custom CSS is added in two places, each time after our own styles:
- The page (sidebar, navigation, breadcrumbs, header, footer). Our theme sets the variables on
.tc-legal-center. - The document frame, which shows the document text. The variables are set on
:rootthere. The document's elements are direct children of<body class="tc-document-body tc-document">, so selectors likebody > pwork.
Our document styles have zero specificity, so any rule you write wins, for example h2 { color: #0a7cff; }. Inline styles in a document always win too.
Override a variable
Override the brand color and the colors marked follows the brand in the table below update with it (in browsers that support color-mix(), which is every current browser). Text colors that sit on the brand or the page are contrast-checked by the editor and don't follow automatically: when you override --tc-color-brand, also set --tc-color-link and --tc-color-on-brand to colors that are readable.
Set variables on .tc-legal-center for the page and on :root for the document frame:
.tc-legal-center,
:root {
--tc-color-brand: #0a7cff;
--tc-color-link: #0a6ad8;
--tc-color-on-brand: #ffffff;
--tc-radius: 4px;
}
Style one part of the page
.tc-legal-center .tc-group-header {
text-transform: uppercase;
letter-spacing: 0.04em;
}
.tc-legal-center .tc-document-item.tc-is-active {
font-weight: 600;
}
CSS variables
Colors are hex values, except the ones that are other variables (var(--tc-color-brand)) or worked out from them (color-mix()). The dark variant (when Light or dark is Dark, or Auto on a device in dark mode) sets the same variables to dark colors, so CSS that uses the variables works in both.
| Variable | What it is |
|---|---|
--tc-color-brand | Brand color (active document, group headers, callout accents). Overriding it updates every color marked "follows the brand" |
--tc-color-brand-hover | Brand color on hover (follows the brand) |
--tc-color-brand-active | Brand color when pressed (follows the brand) |
--tc-color-on-brand | Text drawn on the brand color (contrast-checked; set it too if you override the brand) |
--tc-color-background | Page background |
--tc-color-surface | Sidebar and panel background |
--tc-color-surface-raised | Breadcrumb bar and raised panels |
--tc-color-text | Body text |
--tc-color-muted | Secondary text (dates, version numbers) |
--tc-color-border | Borders and dividers |
--tc-color-link | Links (a contrast-checked shade of the brand; set it too if you override the brand) |
--tc-color-link-hover | Links on hover (follows the link color) |
--tc-color-link-on-surface | Links on the surface color and on tinted banners (header, footer, featured cards, the version banner), contrast-safe on all of them. If you override --tc-color-link, set this one too |
--tc-color-nav-text | Navigation bar links |
--tc-color-hover-text | Text of a hovered document or navigation link |
--tc-color-nav-hover-bg | Background of a hovered navigation link (follows the brand) |
--tc-color-list-hover-bg | Background of a hovered document in the list (follows the brand) |
--tc-color-version-hover-bg | Background of a hovered version in the version menu (follows the brand) |
--tc-color-active-bg | Background of the open document in the list (= --tc-color-brand) |
--tc-color-active-text | Text of the open document in the list (= --tc-color-on-brand) |
--tc-color-group-header-bg | Document group header background (= --tc-color-brand) |
--tc-color-group-header-text | Document group header text (= --tc-color-on-brand) |
--tc-color-group-header-divider | Divider under a document group header |
--tc-color-callout-bg | Callout background in documents (follows the link color) |
--tc-color-callout-border | Callout accent border in documents (follows the brand) |
--tc-color-table-header-bg | Table header background in documents |
--tc-color-table-stripe | Alternate table row background in documents |
--tc-font-heading | Heading font stack |
--tc-font-body | Body font stack |
--tc-font-heading-synthesis | font-synthesis-weight for headings: none when the heading is a Google Fonts family without a bold weight (no fake bold), otherwise auto. Uploaded families are not covered: upload a Bold face to avoid a simulated bold. |
--tc-font-size-base | Base text size (px) |
--tc-line-height | Body line height |
--tc-content-width | Maximum width of the document column |
--tc-sidebar-width | Sidebar width (only set when customized) |
--tc-radius | Corner radius |
--tc-shadow | Panel shadow |
--tc-space | Spacing unit; scales with density |
--tc-color-scheme | light or dark (as used by the CSS color-scheme property) |
--tc-color-diff-ins-bg, --tc-color-diff-ins-text | Comparing versions: background and text of added text (a darker variant in dark mode) |
--tc-color-diff-del-bg, --tc-color-diff-del-text | Comparing versions: background and text of removed text |
Fonts
Pick the heading and body fonts on the Brand tab. Each one can come from:
- System: a font already on your visitors' devices, such as Georgia or Arial. Nothing is downloaded.
- Google Fonts: a family from the searchable list in the editor. The legal center loads it from
fonts.googleapis.comwithdisplay=swap, so text shows in a fallback font until the web font arrives. Families that have true italics load them too. - Uploaded: your own
.woff2files (up to 2 MB each, 20 per organization). Upload one file per weight and style, for example Regular and Bold, under Uploaded fonts. ToughClicks serves them with long-lived caching.
The chosen fonts are loaded on the legal center page and inside the document frame, so --tc-font-heading and --tc-font-body already include them.
When you use Google Fonts, each visitor's browser downloads the font from Google's servers, so Google receives the visitor's IP address. If you use Google Fonts, mention Google as a third party in your own privacy notice. If that conflicts with your privacy policy, upload the font files instead: uploaded fonts are served by ToughClicks.
Self-host a Google font
Most Google Fonts use the SIL Open Font License, which allows self-hosting. Check the license shown on the font's page first.
- On fonts.google.com, open the family and choose Get font, then Download all.
- Use the files in the download's
staticfolder (one file per weight and style), not the variableFamily[wght].ttf. Convert the ones you need (for example Regular, Bold and Italic) to.woff2with a converter such aswoff2_compressor an online WOFF2 converter. Removing characters you don't need (subsetting) makes the file smaller. - Under Uploaded fonts, upload each file with the same family name and its weight and style.
- Pick the family under Uploaded for the heading or body font.
You can't delete any file of an uploaded font family while your draft or published legal center uses that family. Choose another font, save the draft (and publish), then delete it.
Class names
| Class | Element |
|---|---|
tc-legal-center | The root of the page. Attributes: data-tc-contract (contract version), data-tc-scheme (light or dark), data-tc-view (hub for the landing page, document) |
tc-hub | Added to the root on the landing page, when no document is open |
tc-sidebar | The sidebar with the logo and the document list |
tc-logo | The logo (or organization name) button |
tc-document-list | The list of documents |
tc-document-item | One document in the list; tc-is-active on the open one |
tc-group | A document group |
tc-group-header | A document group's header |
tc-main | The main column |
tc-navigation | The navigation bar (your links) |
tc-navigation-link | One navigation link |
tc-breadcrumbs | The breadcrumb bar |
tc-header | Your custom header |
tc-footer | Your custom footer |
tc-document-header | The document title, version and published date |
tc-document-title | The document title (an h1) |
tc-version-select | The version selector |
tc-published-date | The published date |
tc-document-frame | The frame that shows the document |
Templates, header and footer, hub page and document page parts
Added in 2.7.0 (still contract version 1). The root carries tc-template-sidebar, tc-template-hub, tc-template-tabs or tc-template-bare, and data-tc-template with the same name, so CSS can target one template:
.tc-legal-center.tc-template-hub .tc-hub-heading {
font-size: 3rem;
}
| Class | Element |
|---|---|
tc-site-header | The header built on the Header & footer tab; tc-site-header--sticky when it stays on screen (wider screens only), tc-site-header--menu-open while the phone menu is open |
tc-site-menu | The menu button that holds the header links on phones (767px wide or less). In the Sidebar template on phones and tablets the header links sit at the bottom of the document drawer instead (tc-drawer-links) and the call-to-action is in the top bar (tc-mobile-cta) |
tc-site-logo | The logo in that header |
tc-site-nav, tc-site-nav-link | The header links |
tc-site-actions | The "Back to site" link and the call-to-action button |
tc-back-to-site | The "Back to site" link |
tc-cta | The call-to-action button |
tc-site-footer | The footer built on the Header & footer tab |
tc-footer-columns, tc-footer-column, tc-footer-column-title | Footer link columns |
tc-footer-link | A footer link |
tc-footer-contact | The contact or DPO block (an address element) |
tc-footer-bottom | The bottom row: copyright and privacy links |
tc-copyright | The copyright line |
tc-cookie-settings | The "Cookie settings" link. Without a URL it points to #cookie-settings, so a consent manager script can open its settings when it's clicked |
tc-privacy-choices | The "Your privacy choices" link (#privacy-choices without a URL) |
tc-tabs, tc-tab | The document tabs of the Tabs template; tc-is-active on the open document; tc-tabs--fade-start / tc-tabs--fade-end while more tabs are scrolled out of view |
tc-hub-page | The hub page of the Hub + article template |
tc-hub-heading, tc-hub-intro | The hub heading and intro text |
tc-hub-search | The search box |
tc-featured, tc-featured-card | Featured documents and one card |
tc-hub-group | A group on the hub page (tc-hub-group--sub for a subgroup) |
tc-group-description | A group's one-line description |
tc-hub-document | One document in a hub list |
tc-document-date | The updated date next to a document |
tc-upcoming-banner | The banner for a version that takes effect later |
tc-change-summary | "What changed" for the version shown (plain text; line breaks are kept) |
tc-document-layout | The document frame and, when sticky, the table of contents |
tc-toc | The table of contents; tc-toc--inline (above the document), tc-toc--sticky (beside it), and tc-toc--folded (the same list folded above the document on screens narrower than 1024px, and in the Sidebar template up to 1279px, where the document list takes part of the width) |
tc-toc-link | A link in the table of contents |
tc-version-archive | The list of previous versions (not the current or an upcoming one) with their date ranges |
tc-upcoming-banner--previous | Added to tc-upcoming-banner while a previous version is shown |
tc-compare-link | A "Compare versions", "Compare with the previous version" or "See what changes" link |
tc-redline | The comparison of two versions (toolbar, legend and the compared text) |
Inside the document frame:
| Class | Element |
|---|---|
tc-document-root | The frame's html element |
tc-document-body | The frame's body element |
tc-document | Also on the frame's body element: the document's elements are its direct children |
tc-table-scroll | A wrapper around each table that scrolls sideways on narrow screens |
tc-section-anchor | An empty span with the section's stable id (id="section-4-2") at the start of each numbered section |
tc-section-link | Added to the tc-heading-anchor copy link of a numbered paragraph or list item (shown on hover) |
tc-xref | A cross-reference turned into a link ("see Section 7") |
tc-section-target | Added for 2 seconds to the section a cross-reference just went to |
tc-diff-ins | Added text in a comparison (an ins element, underlined) |
tc-diff-del | Removed text in a comparison (a del element, struck through) |
tc-diff-note | A "[link address changed]" note after a link whose address changed |
tc-diff-gap | "…" standing for unchanged text in a very large comparison |
Document typography
The document stylesheet styles h1 to h4, paragraphs, lists, tables (with a header background and striped rows), blockquotes, code and images using the variables above. Long words and URLs wrap instead of running off the page. Two classes are available in your document text:
- Numbered sections.
<ol class="tc-numbered">numbers nested items legal-style (1., 1.1., 1.1.1.).<ol data-tc-numbered>does the same. Other lists keep the browser's numbering (1., 2., 3. at every level). - Callouts.
<div class="tc-callout">(or<aside>) draws a highlighted box. Addtc-callout--warningortc-callout--importantfor an amber or red accent. - Summaries.
<aside class="tc-summary">is a plain-English "short version" of a section, drawn with a brand-colored accent. An optionaldata-tc-labeladds a small caption, for exampledata-tc-label="In short". - Summary boxes can be added in the document editor with Insert summary box: with text selected it wraps the selection, otherwise it adds an empty box with the cursor inside.
- Heading anchors. Every heading gets an id made from its text (letters and digits of any script, other characters become
-, repeats get-2,-3). When Copyable links next to headings is on,h1toh4also get ana.tc-heading-anchorlink that copies the section's URL. Style the link with.tc-heading-anchor. Links to the ids headings had before 2.7.0 keep working: an emptyspan.tc-heading-aliaswith the old id sits at the start of the heading. - Section links. Every numbered section also gets an id from its clause number, not its text, so it doesn't change when other sections are edited: "4.2 Data retention" is
#section-4-2, and "(b)" under 4.2 is#section-4-2-b. Numbers are read from headings and list items ("4.2", "4.", "Section 4", "Clause 3", "Article IV", "§ 9"), from paragraphs that start with a number and a title ("7.1 Fees"), and from<ol>positions (a list under a numbered heading gives that section's subsections, 5.1, 5.2; nested and alphabetic lists give 5.1.1 or 5-a). Sentences ("Section 7 does not apply…") and amounts ("2.5 Million", "10.00 USD") are not sections. The id sits on an emptyspan.tc-section-anchorat the start of the section; a numbered heading's copy link and table of contents entry use it. Copy links of numbered paragraphs are named with the document's own word ("Copy link to “Article 4.2”"). References such as "see Section 7", "Section 4.2(b)" or "Sections 4 and 5" becomea.tc-xreflinks when that section exists. References to laws or other documents ("Articles 15 to 22 GDPR", "Section 4 of our Privacy Policy", "Section 4 DMCA") are not linked. - Comparing versions. Readers can compare two published versions side by side or inline (
?compare=<version>). Added text is anins.tc-diff-insand removed text adel.tc-diff-del, colored with the--tc-color-diff-*variables, underlined or struck through. A changed link address gets aspan.tc-diff-note(callout colors; the old and new address in its title).
Document frame height
In every template the document frame is as tall as the document and the page scrolls (the Sidebar template's document list stays in view). Lengths in vh, vmin and vmax in document styles and custom CSS mean the reader's window, as on a normal page. The frame's html and body always get height: auto, min-height: 0 and overflow: visible (with !important), so custom CSS can't pin their height or hide the rest of the document. vh (also dvh, svh, lvh, vmin, vmax, vb) lengths in declarations are converted to px of the reader's window; class names, url() values and strings are left alone. Links to #heading inside a document scroll to that heading.
Release note (2.7.0): Sidebar centers now scroll as one page (the document list stays in view) instead of scrolling the document inside a fixed-height frame. Custom CSS that fixes the height or
overflowof.legal-center-page,.legal-center-rightor.version-content-iframewith!importantmay cut off documents: remove those rules. Existing documents also pick up the TCK-319 document stylesheet (headings, lists, tables).
Dates under the title
The Date under the title setting shows Published <date> by default (documentPage.dateLabel published, also when the key is absent), Effective <date> (the version's effective date) or Last updated <date> (the publish date). All dates are shown as UTC calendar dates; effective dates start at 00:00 UTC.
The legal center shows the version with the latest effective date that isn't in the future (a version's effective date is its publish date when none is set). A version that takes effect later is announced in a banner with a preview link. The public versions list returns that version's id as currentVersionId.
<ol class="tc-numbered">
<li>Definitions
<ol>
<li>"Service" means ...</li>
</ol>
</li>
</ol>
<div class="tc-callout tc-callout--important">
<p>This section limits our liability.</p>
</div>
<aside class="tc-summary" data-tc-label="In short">
<p>You can cancel at any time and we refund the unused part of your plan.</p>
</aside>
Parts
These elements also have a part attribute with a stable name: sidebar, logo, document-list, document-item, group-header, navigation, breadcrumbs, header, footer, document-title, document-frame, and since 2.7.0 site-header, site-footer, hub, tabs, toc, version-archive, change-summary, upcoming-banner, redline (and document in the frame). On the hosted legal center, style them with the class names above. Where the legal center is rendered inside a shadow root, such as an embedded legal center, use ::part():
toughclicks-legal-center::part(group-header) {
text-transform: uppercase;
}
Font names in CSS
Font names are stored without quotes (for example Helvetica Neue, Arial, sans-serif); the page quotes each family when it builds --tc-font-heading and --tc-font-body. When you set a font in custom CSS, quote multi-word names yourself.
Keyboard focus
Document list items, navigation links, group headers and the logo show a 2px outline in --tc-color-link when focused with the keyboard. If you change link colors, keep the outline visible.
Contrast
The editor's readability check tests every text color against its backgrounds (WCAG AA, 4.5:1), names the setting that causes a problem, offers the nearest shade that reads well, and asks for confirmation before you publish text that may be hard to read. Custom CSS isn't checked: if you change colors in CSS, check the contrast yourself.