Re is out: see what's new Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

CSS variables

Updated 1 min read 10 views

The Re:Maily style reads CSS variables, so a theme changes colors and spacing without touching templates. Set them on .remaily for every form, or on one form’s wrapper class.

.remaily {
	--remaily-accent: #0a7c55;
	--remaily-accent-hover: #086445;
	--remaily-radius: 10px;
}
VariableDefaultUsed for
--remaily-accent#1b2affButtons, checked boxes, focus
--remaily-accent-hover#1420d6Buttons on hover
--remaily-on-accent#ffffffText on the accent
--remaily-borderthe text color at 22%Field borders
--remaily-border-hoverthe text color at 40%Field borders on hover
--remaily-field-bgtransparentField background
--remaily-mutedthe text color at 65%Placeholders and hints
--remaily-danger#d92d20Errors
--remaily-success#12805cThe sent message
--remaily-radius6pxCorners
--remaily-gap1.25remSpace between fields
--remaily-control-padding.75em 1emPadding inside fields
--remaily-focus-ringa 3px accent ring at 25%The focus outline

The Re:Maily form style also has its own variables, named --remaily-form-default--{name}: gap, radius, border, field-bg, padding, button-bg, button-bg-hover, button-color, check-bg, check-mark and check-radius. They default to the variables above, so set them only to change one form style without the others.

Was this article helpful?