Skip to Content

Theming

Restyle the widget with five CSS variables and three ::part() names.

The widget takes your page's font by default and comes in light and dark. Everything else you set from your own stylesheet.

Light and dark

<whocoming-rsvp event="evt_demo0000000000000001" theme="dark"></whocoming-rsvp>

theme is auto (follow the visitor's system setting, the default), light or dark.

CSS variables

Set these on the element, or on any ancestor:

VariableSetsDefault
--wc-accentPrimary button and focus colorOrganization accent, else the text color
--wc-radiusCorner radius of the card and controls0.75em
--wc-fontFont familyInherited from your page
--wc-bgCard backgroundWhite, or near-black in dark
--wc-textText color. Muted text and borders are mixed from it and --wc-bgNear-black, or near-white in dark
whocoming-rsvp {
  --wc-accent: #3451f5;
  --wc-radius: 4px;
  --wc-font: "Georgia", serif;
  --wc-bg: #fffaf0;
  --wc-text: #1f1a17;
}

Text on the accent switches between dark and light automatically, so any accent stays readable.

The accent attribute wins over --wc-accent, and both win over the organization's accent from the dashboard. The widget reads --wc-accent when it starts and when an attribute changes; set it before the widget loads rather than animating it.

Parts

For anything the variables do not cover, style the widget's parts with ::part():

PartElement
cardThe outer card
buttonEvery button: RSVP, send, back, retry
inputEvery text field, select and text area in the form
whocoming-rsvp::part(card) {
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
  border: none;
}

whocoming-rsvp::part(button) {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

whocoming-rsvp::part(input) {
  background: #f6f6f6;
}

Parts and variables are the supported styling surface. Class names inside the Shadow DOM may change in any release; these will not.

Sizing

The widget is display: block and fills its container between 280 and 480 pixels wide. Control width with the container, or on the element:

whocoming-rsvp {
  max-width: 360px;
  margin-inline: auto;
}

On this page