Custom CSS docs · Variables

Custom CSS

Variables

The --linker-* custom properties the Look tab sets, and how to read or override them.

Read them to follow the Look tab:

[data-part="link"] {
  background: var(--linker-button);
}

Set them to override it:

:root {
  --linker-button: #ff0055;
  --linker-radius: 0;
}

Set them on :root

Linker mixes other colours from the inputs on the root. Set an input anywhere else and only half your page follows.

/* Works everywhere. */
:root {
  --linker-button: #ff0055;
}

/* Only half works. */
[data-part="link"] {
  --linker-button: #ff0055;
}

The inputs

Variable Set by What reads it
--linker-bg Background colour The page’s background colour, under any picture, and the scrim
--linker-bg-image Background picture The page’s background on screens wider than 40rem. none without a picture
--linker-bg-image-mobile Background picture The same picture cropped for phones, at 40rem and narrower. The wide crop when there’s no phone one
--linker-bg-dim Dim the image How strongly the scrim dims the picture, 0 to 1. 0 without a picture
--linker-text Text colour All text on the page, the keyboard focus ring, a ghost button’s label
--linker-button Button colour A solid button’s fill, an outline’s frame and label, the glow and ring hovers
--linker-button-text Button text colour A solid button’s label, and the initials
--linker-font Font The page’s font-family: the Google Font you picked, then the system font
--linker-text-scale Text size A factor on every text size, 0.75 to 1.5; 1 at the default size
--linker-radius Corner roundness Every button’s corners and the name panel’s. The avatar is always a circle
--linker-blur Button blur Frosted glass behind the buttons: none, or blur(12px) and so on
--linker-shadow Shadow The avatar’s shadow
--linker-button-shadow Shadow A resting button’s shadow. Only solid buttons have one; none for outline and ghost
--linker-hover-transform Hover effect What a hover does to a button: translateY(-3px) for lift, scale(1.03) for grow, or none
--linker-hover-shadow Hover effect The shadow under a hovered button: deeper for lift, a glow or a ring

Made from the inputs

Variable Made from What reads it
--linker-button-surface --linker-button at the Look tab’s button opacity A solid button’s real fill, the initials’ background
--linker-label-surface --linker-button-surface for solid buttons, otherwise transparent The name panel’s fill
--linker-label-border --linker-button for outline buttons, otherwise transparent The name panel’s frame
--linker-label-text The label colour of your button style The name panel’s text

The name panel is the Look tab’s Background behind text.

For the Fill hover

Variable What it is Outline and ghost buttons Solid buttons
--linker-fill The flood’s colour --linker-button --linker-button-text
--linker-fill-text The label’s colour while it floods --linker-button-text --linker-button

Your own variables

Use any name not starting with --linker-:

:root {
  --my-deep: #052e16;
  --my-lime: #a3e635;

  --linker-bg: var(--my-deep);
  --linker-button: var(--my-lime);
  --linker-button-text: var(--my-deep);
}