Overriding Widget Styles
Here you'll find a list of every --lift-* CSS custom property the donation box and the popup read, grouped by which widget it affects. Values shown are the built-in defaults used when a variable is not set.
How to override
Paste declarations into the Custom CSS variables field in the widget's Style settings in the Lift app, for example:
--lift-primary-button-background: #0a7c3e; --lift-primary-button-font-weight: 700; --lift-donation-tier-option-border-radius: 999px;
- Each widget has its own field. A variable set on the donation box does not reach the popup, even where the variable name is shared.
- The field is written after the values Lift generates from the Style settings (colours, corners, borders), so it wins over them.
- Most component variables fall back to a base token. Setting
--lift-primary-base-colorrestyles every button, tier and input at once; set a component variable only to break one element away from it. - Each property has one variable that applies at every width. To make a value respond to width, use
clamp()with width units, for example--lift-expanded-h1-font-size: clamp(1.25em, 6cqi, 2em);. In the donation box,cqiis 1% of the box's width; in the popup, usevw(1% of the browser window).
Both widgets
These names are read by the donation box and the popup alike. Set them in each widget's own field.
Base theme tokens
Lift already sets these from the Style settings; overriding them here changes every element that falls back to them.
| Variable | Controls | Default |
|---|---|---|
--lift-primary-base-color |
Buttons, donation tiers, input borders and prefix, links, popup trigger | #000000 |
--lift-body-text-color |
Headings, paragraphs, input text, checkbox | #000000 |
--lift-element-corners |
Corner radius of buttons, tiers, inputs, carousel controls | 5px |
--lift-font-size |
Base font size; most sizes below are em relative to it |
16px |
--lift-error-color |
Donation error message text | #d72c0d |
Primary button (Donate)
| Variable | Controls | Default |
|---|---|---|
--lift-primary-button-background |
Background | primary base colour |
--lift-primary-button-background-hover |
Hover background | primary base, 20% darker |
--lift-primary-button-text-color |
Text colour | primary base, 90% lighter |
--lift-primary-button-border |
Border shorthand | 0 |
--lift-primary-button-border-hover |
Hover border | 0 |
--lift-primary-button-border-radius |
Corners | --lift-element-corners |
--lift-primary-button-font-size |
Font size | 1em |
--lift-primary-button-font-weight |
Font weight | 400 |
--lift-primary-button-text-transform |
Text transform | inherits from theme |
--lift-primary-button-padding |
Padding | 0 |
--lift-primary-button-margin |
Margin | 0 |
Secondary button (Cancel)
| Variable | Controls | Default |
|---|---|---|
--lift-secondary-button-background |
Background | #e9e9e9 |
--lift-secondary-button-background-hover |
Hover background | #e9e9e9 , 10% darker |
--lift-secondary-button-text-color |
Text colour | primary base colour |
--lift-secondary-button-border |
Border shorthand | 0 |
--lift-secondary-button-border-hover |
Hover border | 0 |
--lift-secondary-button-border-radius |
Corners | --lift-element-corners |
--lift-secondary-button-font-size |
Font size | 1em |
--lift-secondary-button-font-weight |
Font weight | 400 |
--lift-secondary-button-text-transform |
Text transform | inherits from theme |
Donation amount tiers
| Variable | Controls | Default |
|---|---|---|
--lift-donation-tier-option-background |
Unselected tier background | primary base, 90% lighter |
--lift-donation-tier-option-color |
Unselected tier text | primary base colour |
--lift-donation-tier-option-checked-background |
Selected tier background | primary base colour |
--lift-donation-tier-option-checked-color |
Selected tier text | primary base, 90% lighter |
--lift-donation-tier-option-border-radius |
Corners | --lift-element-corners |
--lift-donation-tier-option-font-size |
Font size | 1em |
--lift-donation-tier-option-margin |
Margin | 0 0 8px 0 |
Inputs and labels
| Variable | Controls | Default |
|---|---|---|
--lift-widget-input-label-font-size |
Field label size | 1em |
--lift-widget-input-label-font-weight |
Field label weight | 700 |
--lift-widget-input-label-margin |
Field label margin | 0 0 0.5em 0 |
--lift-widget-text-input-font-size |
Amount input text size | 1em |
--lift-widget-text-input-validation-message-font-size |
Validation message size | 0.9em |
--lift-text-input-prefix-background |
Currency prefix background | primary base colour |
--lift-text-input-prefix-color |
Currency prefix text | primary base, 90% lighter |
--lift-text-input-prefix-font-size |
Currency prefix size | 1em |
Donation box only
These apply to the donation box (theme app block and the lift-donation-box snippet). The popup ignores them.
Box
Lift sets the first four from the Style settings.
| Variable | Controls | Default |
|---|---|---|
--lift-box-background-color |
Box background (also the checkbox background) | #ffffff |
--lift-box-border-color |
Box border colour | #000000 |
--lift-box-border-width |
Box border width | 1px |
--lift-box-border-radius |
Box corners | 5px |
--lift-compact-border-style |
Compact layout border style | solid |
--lift-compact-padding |
Compact layout padding | 20px |
--lift-compact-text-align |
Compact layout text alignment | left |
--lift-compact-carousel-margin |
Compact layout cause carousel margin | 0 0 7px 0 |
--lift-expanded-border-style |
Expanded layout border style | solid |
--lift-expanded-content-padding |
Expanded layout padding at every width | 20px , or 30px when the box is 768px wide or more |
Headings and paragraphs
Names follow --lift-{layout}-{element}-{property} , where layout is compact or expanded and element is h1 , h2 , h3 or p .
| Property | h1 | h2 | h3 | p |
|---|---|---|---|---|
font-size |
1.5em |
1.25em |
1em |
1em |
margin |
0 0 1em 0 |
0 0 1em 0 |
0 0 1em 0 |
0 0 1em 0 |
line-height |
inherits from theme | inherits from theme | inherits from theme | inherits from theme |
font-weight |
700 |
700 |
700 |
not available |
color |
body text colour | body text colour | body text colour | body text colour |
Example: --lift-expanded-h2-font-size: 1.5em;
Compact layout "Learn more" button
Below 550px of box width it shows as a filled button; from 550px it shows as a plain link, so it has a colour for each form.
| Variable | Controls | Default |
|---|---|---|
--lift-learn-more-button-color |
Text colour as a button | #ffffff |
--lift-learn-more-link-color |
Text colour as a link | primary base colour |
--lift-learn-more-background |
Button background | primary base colour |
--lift-learn-more-padding |
Button padding | 7px 9px |
--lift-learn-more-border |
Button border shorthand | 0 |
--lift-learn-more-border-radius |
Button corners | --lift-element-corners |
--lift-learn-more-font-size |
Font size | 1em |
--lift-learn-more-font-weight |
Font weight | bold |
Expanded layout collapse button
| Variable | Controls | Default |
|---|---|---|
--lift-expanded-widget-collapse-button-color |
Text colour | primary base colour |
--lift-expanded-widget-collapse-button-font-size |
Font size | 0.8em |
--lift-expanded-widget-collapse-button-font-weight |
Font weight | 400 |
--lift-expanded-widget-collapse-button-padding |
Padding | 0 |
--lift-expanded-widget-collapse-button-margin |
Margin | 0 |
Cause previews and cause detail dialog
| Variable | Controls | Default |
|---|---|---|
--lift-section-cause-preview-content-h3-font-size |
Cause name size | 1em |
--lift-section-cause-preview-content-h3-font-weight |
Cause name weight | inherits from theme |
--lift-section-cause-preview-content-h3-margin |
Cause name margin | 0 0 1em 0 |
--lift-section-cause-preview-modal-button-font-color |
"Read more" link colour | primary base colour |
--lift-section-cause-preview-modal-button-font-size |
"Read more" link size | 0.8em |
--lift-section-cause-preview-modal-button-font-weight |
"Read more" link weight | 400 |
--lift-section-cause-preview-overlay-button-color |
Preview overlay button colour | primary base colour |
--lift-cause-dialog-background |
Cause detail dialog background | #ffffff |
Popup only
These apply to the donation popup and its trigger. The donation box ignores them.
Trigger button or image
Lift sets --lift-popup-trigger-border-radius from the Style settings.
| Variable | Controls | Default |
|---|---|---|
--lift-popup-trigger-background-color |
Button background | primary base colour |
--lift-popup-trigger-background-color-hover |
Button hover background | primary base, 10% darker |
--lift-popup-trigger-text-color |
Button text colour | #ffffff |
--lift-popup-trigger-font-size |
Button font size | 16px |
--lift-popup-trigger-padding |
Button padding | 20px |
--lift-popup-trigger-border |
Button border shorthand | 0 |
--lift-popup-trigger-border-radius |
Button and image corners | 20px |
--lift-popup-trigger-box-shadow |
Button and image shadow | soft drop shadow |
--lift-popup-trigger-transition |
Hover transition | all 0.2s ease |
--lift-popup-trigger-cursor |
Cursor | pointer |
--lift-popup-trigger-z-index |
Stacking order | 9998 |
--lift-popup-trigger-max-width |
Image trigger max width | 250px |
--lift-popup-trigger-max-height |
Image trigger max height | 80px |
--lift-popup-trigger-position-top |
Offset from top (top-left, top-right positions) | 20px |
--lift-popup-trigger-position-bottom |
Offset from bottom (bottom-left, bottom-right) | 20px |
--lift-popup-trigger-position-left |
Offset from left (top-left, bottom-left) | 20px |
--lift-popup-trigger-position-right |
Offset from right (top-right, bottom-right) | 20px |
Popup panel
Lift sets the first four from the Style settings.
| Variable | Controls | Default |
|---|---|---|
--lift-popup-background-color |
Panel, content and tax relief checkbox background | #ffffff |
--lift-popup-border-color |
Panel border colour | #000000 |
--lift-popup-border-width |
Panel border width | 0px |
--lift-popup-border-style |
Panel border style | solid |
--lift-popup-border-radius |
Panel corners | 5px |
--lift-popup-modal-z-index |
Stacking order of the open popup | 9999 |
--lift-popup-content-padding |
Content padding at every width | 20px , or 30px when the window is 768px wide or more |
--lift-popup-close-button-color |
Close (X) button colour | #000000 |
Headings and paragraphs
Names follow --lift-popup-{element}-{property} , where element is h1 , h2 , h3 or p .
| Property | h1 | h2 | h3 | p |
|---|---|---|---|---|
font-size |
1.5em |
1.25em |
1em |
1em |
margin |
0 0 1em 0 |
0 0 1em 0 |
0 0 1em 0 |
0 0 1em 0 |
line-height |
inherits from theme | inherits from theme | inherits from theme | inherits from theme |
font-weight |
700 |
700 |
700 |
not available |
color |
body text colour | body text colour | body text colour | body text colour |
Example: --lift-popup-h1-font-size: 2em;
Cause previews
| Variable | Controls | Default |
|---|---|---|
--lift-popup-cause-preview-content-h3-font-size |
Cause name size | 1em |
--lift-popup-cause-preview-content-h3-font-weight |
Cause name weight | inherits from theme |
--lift-popup-cause-preview-content-h3-margin |
Cause name margin | 0 0 1em 0 |
--lift-popup-cause-preview-modal-button-font-color |
"Read more" link colour | primary base colour |
--lift-popup-cause-preview-modal-button-font-size |
"Read more" link size | 1em |
--lift-popup-cause-preview-modal-button-font-weight |
"Read more" link weight | 400 |
--lift-popup-cause-preview-overlay-button-color |
Preview overlay button colour | primary base colour |
Notes
- Line height, text transform and cause-name weight inherit from the theme until you set them. The primary button has no padding by default; set
--lift-primary-button-paddingto add some. - Names are kebab-case and case-sensitive. They must match exactly.