Custom CSS
Styles that adapt
Use Linker's variables instead of fixed colours, so your CSS fits any page.
Fixed colours break when the Look tab changes. Variables follow it.

Left: fixed colours. Right: variables.
Don’t:
:root {
background: #111827;
}
:is([data-part="link"], [data-part="social"]) {
background: #f9fafb;
border-color: #f9fafb;
color: #111827;
border-radius: 999px;
}
Do:
:root {
background: var(--linker-bg);
}
:is([data-part="link"], [data-part="social"]) {
background: var(--linker-button);
border-color: var(--linker-button);
color: var(--linker-button-text);
border-radius: 999px;
}
Mixing your own shades
Use color-mix() for tints and shades:
[data-part="description"] {
/* Softer text. */
color: color-mix(in oklab, var(--linker-text) 70%, var(--linker-bg));
}
:is([data-part="link"], [data-part="social"]) {
/* A slightly darker frame. */
border-color: color-mix(in oklab, var(--linker-button), black 20%);
}
:root {
/* A glow in the corner. */
background-image: radial-gradient(
circle at 15% 10%,
color-mix(in oklab, var(--linker-button) 40%, transparent),
transparent 45%
);
}
For corners, use var(--linker-radius).
What your CSS takes over
Whatever you set yourself stops following the Look tab:
- Colours you set override the Look tab’s colours.
- A background on
:rootreplaces your background picture. See the recipe to keep it. - Your own button background, border and colour override the button style.
- Your own
transformorbox-shadowon hover override the hover effect.
To change something only for some settings, see State attributes.