Skip to content

Custom CSS ​

Custom CSS lets you restyle what the theme settings do not cover, with your own CSS on a Layout Theme (page-wide) or a Widget Theme (only the widgets that use it). It is applied after the theme's own styles, so plain rules win without !important.

Availability: accounts with custom CSS turned on; writing it needs the Update Custom Css permission.

Who can use it ​

Custom CSS needs the Update Custom Css permission on your role, on top of editing the theme; without it you can see the CSS but not change it. Super admins have it by default; give it to other roles under Settings → Roles. A theme shared with your workspace from another one stays read-only.

Where to write it ​

  • Layout Theme: open the theme and go to the Custom CSS tab. The CSS applies to every page using the theme. Use Preview to see it before saving.
  • Widget Theme: open the theme and its Custom CSS tab. The CSS applies only to the widgets that use this theme: every rule is confined to them automatically, so it cannot change anything else on the page. Write :scope for the widget itself, for example :scope:hover .lk-widget-title { color: #b45064; }. The live preview above the editor shows your draft.

What to target ​

Target the lk-* classes and --lk-* variables of the Theme CSS reference, which describes each one: what it is, where it sits on the page, its states and the variables that style it. They are a stable contract: they keep working when linkable.id changes its own markup. Other class names you may see in the page (layout utilities such as flex or px-5) can change at any time; do not rely on them.

Variables carry the theme's own values. Redefine one to change it everywhere it is used, for example :root { --lk-header-background-color: #1f2937; } in a Layout Theme, or :scope { --lk-w-title-color: #b45064; } in a Widget Theme.

What the main hooks style ​

HookWhat it is
lk-pageThe page <body>; it also carries data-lk-layout-theme
lk-layout--entry, lk-layout--site, lk-layout--fullscreenThe page wrapper, by kind of page
lk-header, lk-header-inner, lk-header-logoThe top bar, its centred content row, the logo box
lk-header-link, lk-header-link-text, lk-header-link-iconA link in the top bar, its text, its icon
lk-header-drawer, lk-header-drawer-link, lk-header-iconThe phone menu panel, its links, the menu and close icons
lk-submenu, lk-submenu-buttonThe bar under the header on smaller screens, its buttons
lk-content, lk-widgetsThe content column, the stack of widgets in it
lk-sidebar, lk-sidebar-title, lk-sidebar-entry (--active), lk-sidebar-categoryA site's page menu, its title, a page link (the current one), a category
lk-outline, lk-outline-link, lk-outline-sublink, lk-outline-dropdown"On this page", its links, heading links, its phone dropdown
lk-pagination-link, lk-pagination-label, lk-pagination-titlePrevious / next cards at the bottom of a site page
lk-card-show, lk-card-button (--primary, --secondary), lk-card-chips, lk-card-installA business card page: the view it opens on from the Home Screen, its buttons, the Share chip, the install steps
lk-widget (lk-widget--{type}, for example lk-widget--email)A widget's card; in a Widget Theme this is :scope
lk-widget-header, lk-widget-icon, lk-widget-titleThe card's header bar, its leading icon, its title
lk-widget-action--clipboard, --redirect, --download, --asset-downloadThe action buttons in the header (copy, open, download)
lk-widget-body, lk-widget-content, lk-widget-subtitle, lk-widget-briefThe card's body, its padded content, the subtitle, the description

Each widget type adds its own hooks, for example lk-email-value, lk-gallery-nav, lk-palette-swatch or lk-markdown. The Theme CSS reference lists every hook and variable, by area and widget type.

The Markdown widget also keeps the class markdown-body; its built-in stylesheet targets .markdown-body …, so override those rules with a selector at least as specific, or redefine its --md-* variables.

Business card pages ​

A page in business card mode adds the lk-card-* hooks. Their colors and corner radius come from the theme of the page's Contact widget (its download button for the primary buttons, its border, background and text colors), and their fonts from the page, as these variables on .lk-card-ui: --lk-card-radius, --lk-card-button-radius (the buttons' corners: the theme's button shape, else the corner radius), --lk-card-primary-background, --lk-card-primary-color, --lk-card-primary-border, --lk-card-hover-background, --lk-card-surface, --lk-card-text, --lk-card-muted, --lk-card-border. Redefine one in a .lk-card-ui rule, or style the hooks directly, for example .lk-card-button { text-transform: uppercase; }.

The PDF viewer ​

The PDF widget's viewer has its own hooks and variables (PDF widget in the reference). Write them in the Widget Theme used by your PDF widgets:

  • lk-pdf is the whole viewer; lk-pdf-toolbar the bar with the page counter (lk-pdf-counter) and the buttons (lk-pdf-button); lk-pdf-stage the area around the pages; lk-pdf-page each page; lk-pdf-arrow the large previous and next arrows; lk-pdf-panel the Pages, Contents and Search panels, with lk-pdf-thumb, lk-pdf-toc-item and lk-pdf-search-result inside them.
  • States: lk-pdf--fullscreen while the viewer is full screen, lk-pdf-panel--open on the open panel, lk-pdf-thumb--current on the current page's thumbnail.
  • Variables, set in a :scope rule: --lk-pdf-background (behind the pages), --lk-pdf-toolbar-background, --lk-pdf-toolbar-color (text and icons), --lk-pdf-accent (focus rings, the current thumbnail, the loading spinner), --lk-pdf-button-hover-background, --lk-pdf-control-radius (buttons and arrows), --lk-pdf-page-background, --lk-pdf-shadow, --lk-pdf-panel-background, --lk-pdf-panel-color, --lk-pdf-turn-duration (how long a page turn takes, for example 400ms; up to 3s) and --lk-pdf-shadow-strength (the light and shadow of a page turn, from 0, none, to 1, the default).

The viewer also uses classes starting with afb and variables starting with --afb. Those are internal and may change; use the lk-pdf ones.

Brand Vault images ​

To use an image from your Brand Vault, write url(vault:ID) with the asset's id, for example .lk-page { background-image: url(vault:42); }. To find the id, open the asset in the Brand Vault: it is the number in the address bar (…/brand-vault/42/edit); Claude also returns it when it lists your assets. Only images and icons of your own workspace can be used. Every visitor gets a fresh, signed link to the file.

Examples ​

A Layout Theme with a slimmer, branded header and rounded widget cards across the page:

css
.lk-header { border-bottom-width: 3px; box-shadow: none; }
.lk-header-link-text { letter-spacing: 0.04em; text-transform: uppercase; }
.lk-widget { border-radius: 16px; }
@media (max-width: 640px) {
  .lk-content { padding-top: calc(var(--header-height, 80px) + 1rem); }
}

A Widget Theme whose cards lift on hover and whose titles follow a brand colour:

css
:scope { transition: transform 150ms ease, box-shadow 150ms ease; }
:scope:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
:scope { --lk-w-title-color: #b45064; }

A Widget Theme for PDF widgets: a toolbar in brand colours, rounded pages and quicker page turns:

css
:scope {
  --lk-pdf-background: #f4f1ec;
  --lk-pdf-toolbar-background: #1f2937;
  --lk-pdf-toolbar-color: #ffffff;
  --lk-pdf-accent: #e85d04;
  --lk-pdf-turn-duration: 400ms;
}
.lk-pdf-page { border-radius: 8px; overflow: hidden; }
.lk-pdf-button:hover { color: #e85d04; }

A page background from the Brand Vault, and a design system's token in your own rule:

css
.lk-page { background-image: url(vault:42); background-size: cover; }
.lk-header { border-color: var(--brand-primary); }

What is not allowed ​

CSS is checked when you save. If anything is not allowed, nothing is saved and you see the line and the reason; nothing is ever removed silently.

  • Up to 64 KB for a Layout Theme and 32 KB for a Widget Theme.
  • url() only for a Brand Vault image (url(vault:ID)) or an image or font data: URI. Addresses on other sites are refused, so your pages never make visitors' browsers contact third parties.
  • Not allowed: @import, @font-face (fonts come from the theme's font settings), @charset, @namespace, @page; image-set(), cross-fade(), image(), src(), expression(); the < character; backslashes (CSS escapes); CSS nesting with &.
  • Allowed at-rules: @media, @supports, @keyframes, @container, @layer. In a Widget Theme, @keyframes names are made unique for that theme automatically; keep using the name you wrote.

Good to know ​

  • Saving is live. Like every theme change, saved CSS shows at once on every page using the theme. Preview first (Layout Themes: Preview; Widget Themes: the live preview above the editor).
  • There is no history. Before a big change, copy the current CSS somewhere safe; to undo everything, clear the field and save.
  • Which CSS wins. Theme settings < your Layout Theme CSS < your Widget Theme CSS for its own widgets (its rules are more specific). Within one stylesheet, the later rule wins at equal specificity.
  • Markdown and code snippets. The Markdown widget's typography and the code snippets' syntax colours use more specific rules than the other hooks ([data-lk-widget-theme] .lk-markdown h1); match that specificity, or redefine their variables (--md-*, --cs-*, --lk-w-h1-color and so on).

Design systems ​

A design system imported into the Brand Vault (the model used until October 2026) created theme sets when a version was published. Their Layout Theme got the system's colours and tokens in its custom CSS as variables (for example --brand-primary), between two comments marking a region. Use them in your own rules: .lk-header { border-color: var(--brand-primary); }. Nothing updates that region anymore (the import was retired in November 2026), so edit it like the rest of your CSS.

Working with an AI ​

With Claude, through the connector. Claude can read and write custom CSS once your connection has the Write custom CSS on widget and layout themes permission (reconnect the connector to approve it) and your role has Update Custom Css. Claude reads the same hooks, variables and limits as this page, saves through the same checks, and gets the line and reason back if something is not allowed. Changes go live immediately, like panel edits. See Connect Claude. Paste this to start:

text
I want to restyle my linkable.id pages with custom CSS. Work only through the
linkable.id connector:

1. Call get_theme_schema for kind "layout" and for kind "component", and read
   their custom_css sections: the lk-* hooks, the --lk-* variables and the
   limits. Use only those hooks and variables, never other class names.
2. List my layout themes and widget themes and ask me which one to change.
   Layout CSS applies to the whole page; widget CSS applies only to the widgets
   using that theme, where :scope means the widget itself.
3. Read the theme's current custom_css first. set_theme_custom_css REPLACES it,
   so always send the complete stylesheet: keep what is there unless I ask to
   remove it, and never touch the region between the "design-system tokens"
   comments.
4. For images, use url(vault:ID) with an image id from list_vault_assets; no
   other addresses. Do not use @import, @font-face, !important or CSS nesting
   with &.
5. Show me the CSS and explain it before saving; after saving, give me the
   review link from the response. If the save is refused, fix the line it
   names and try again.

What I want: [describe the change]

With any other AI. An assistant without the connector cannot see your themes, so point it to the reference for AI tools, then paste its answer into the theme's Custom CSS field yourself. Use this prompt:

text
Write CSS for a linkable.id [Layout Theme | Widget Theme]. Rules:
- Target only the classes and variables of the linkable.id theme CSS
  reference: https://help.linkable.id/reference/theme-css (each hook, where it
  sits and the variables that style it; prefer redefining those variables).
- Layout Theme CSS applies to the whole page. Widget Theme CSS is confined to
  its widgets automatically; use :scope for the widget itself.
- No @import, @font-face, @charset, @namespace or @page; no image-set(),
  cross-fade(), image(), src() or expression(); no < character, no
  backslashes, no CSS nesting with &, no !important.
- url() only as url(vault:ID) with an id I give you, or a data: image or font.
- Allowed at-rules: @media, @supports, @keyframes, @container, @layer.
- Up to 64 KB (Layout Theme) or 32 KB (Widget Theme).
Return one complete stylesheet with a short comment above each rule.

What I want: [describe the change]