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:
| Variable | Sets | Default |
|---|---|---|
--wc-accent | Primary button and focus color | Organization accent, else the text color |
--wc-radius | Corner radius of the card and controls | 0.75em |
--wc-font | Font family | Inherited from your page |
--wc-bg | Card background | White, or near-black in dark |
--wc-text | Text color. Muted text and borders are mixed from it and --wc-bg | Near-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():
| Part | Element |
|---|---|
card | The outer card |
button | Every button: RSVP, send, back, retry |
input | Every 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;
}