Free Community Tool by Nahnu Media

The Complete
SureForms
CSS Reference

Every CSS variable, selector and recipe for SureForms in one searchable tool. Stop guessing. Start styling.

CSS Tier:
Free plan

SureForms uses CSS custom properties (variables) prefixed with --srfm-*. PHP generates a scoped style block per form that sets these variables, and the plugin stylesheet reads them. Override the variables on the form container class to restyle the entire form.

Three Ways to Target

Retheme one form

Set variables on .srfm-form-container-{id} to change that form's entire look in one CSS block.

Target one element

Scope a selector: .srfm-form-container-{id} .srfm-block-label. Only affects that element in that form.

Apply to all forms

Use .srfm-form-container with no ID to apply to every SureForms instance on the site.

Find Your Form ID

Right-click your form and click Inspect. Find the outermost div with a class starting with srfm-form-container-. The number at the end is your form post ID. That full class is your CSS scope.

find-form-id.css
/* The div in your page source looks like: */
<div class="srfm-form-container srfm-form-container-456">

/* Use that scoped class to target your specific form: */
.srfm-form-container-456 {
  --srfm-color-scheme-primary: #1d6ef5;
}

Where to Put Your CSS

Per-form custom CSS

Form editor, right sidebar, Form tab, Advance section, Custom CSS. Scoped automatically.

Appearance, Additional CSS

Global overrides that apply across all SureForms on the site.

Child theme style.css

Best for production. Survives theme updates.

All variables below work on the free SureForms plan. Override them on .srfm-form-container-{id} and the plugin stylesheet picks them up automatically.

Brand Colors - the three primaries that cascade into everything

--srfm-color-scheme-primaryMain brand color. Drives button background, focus ring, checkbox fill, selected states, and progress bar.
--srfm-color-scheme-text-on-primaryText on the submit button. Usually #fff on a dark button.
--srfm-color-scheme-textBody text color. SureForms derives every input color from this using opacity fractions automatically.
--srfm-body-input-colorDirect input text color override, bypasses the derived value.
--srfm-btn-color-hoverButton background on hover. Default is primary at 90% opacity.

Input Colors

--srfm-color-input-backgroundInput background. Default is text-color at 2% opacity.
--srfm-color-input-background-hoverInput background on hover. Default is text-color at 5%.
--srfm-color-input-background-disabledDisabled input background. Default is text-color at 7%.
--srfm-color-input-borderInput border. Default is text-color at 25%.
--srfm-color-input-border-hoverBorder on hover. Default is primary at 65%.
--srfm-color-input-border-focus-glowBox-shadow glow on focus. Default is primary at 15%.
--srfm-color-input-border-disabledBorder when disabled. Default is text-color at 15%.
--srfm-color-input-labelLabel text color. Equals text-color by default.
--srfm-color-input-descriptionHelp text color. Default is text-color at 65%.
--srfm-color-input-placeholderPlaceholder text. Default is text-color at 50%.
--srfm-color-input-textTyped text color. Equals text-color by default.
--srfm-color-input-prefixPrefix and suffix icon color. Default is text-color at 65%.
--srfm-color-input-selectedSelected option background. Default is primary at 10%.
--srfm-disabled-background-colorFull background override for disabled state.
--srfm-disabled-border-colorFull border override for disabled state.
--srfm-disabled-colorText color override for disabled state.
--srfm-error-colorValidation error message text color.
--srfm-error-color-borderInput border color in error state.
--srfm-error-color-border-glowBox-shadow glow when an input has a validation error.

Typography

--srfm-label-font-sizeLabel font size.
--srfm-label-line-heightLabel line height.
--srfm-label-font-weightLabel font weight.
--srfm-input-field-font-sizeInput text font size.
--srfm-input-field-line-heightInput text line height.
--srfm-input-field-font-weightInput text font weight.
--srfm-font-sizeBase font size for the entire form.
--srfm-description-font-sizeHelp text font size.
--srfm-description-line-heightHelp text line height.
--srfm-description-font-weightHelp text font weight.
--srfm-description-margin-topTop gap above description text.
--srfm-error-font-sizeError message font size.
--srfm-error-font-weightError message font weight.
--srfm-error-line-heightError message line height.
--srfm-btn-font-sizeSubmit button font size.
--srfm-btn-line-heightSubmit button line height.
--srfm-btn-font-weightSubmit button font weight.

Spacing and Sizing

--srfm-form-padding-top/right/bottom/leftForm container padding per side.
--srfm-form-border-radius-top / right / bottom / leftForm container corner radius per corner (four independent properties).
--srfm-row-gap-between-blocksVertical gap between form fields.
--srfm-column-gap-between-blocksHorizontal gap in multi-column layouts.
--srfm-input-heightInput field height.
--srfm-input-field-paddingInner padding of input fields.
--srfm-input-field-margin-topSpace above the input, below the label.
--srfm-input-field-margin-bottomSpace below the input field.
--srfm-input-field-border-radiusInput corner radius.
--srfm-input-label-gapGap between label and input.
--srfm-btn-paddingButton inner padding shorthand.
--srfm-btn-border-radiusButton corner radius.
--srfm-check-ctn-width / heightCheckbox container dimensions.
--srfm-check-svg-sizeCheckmark icon size.
--srfm-check-gapGap between checkbox and label.
--srfm-checkbox-input-border-radiusCheckbox corner radius.
--srfm-dropdown-font-sizeDropdown text size.
--srfm-dropdown-font-weightDropdown font weight.
--srfm-dropdown-option-paddingDropdown option row padding.
--srfm-dropdown-menu-paddingOpen dropdown menu container padding.
--srfm-dropdown-badge-paddingMulti-select tag padding.
--srfm-dropdown-badge-gapGap between multi-select badges.
--srfm-dropdown-badge-icon-gapGap between badge text and its delete icon.
--srfm-dropdown-badge-delete-iconDelete icon size inside a multi-select badge.
--srfm-dropdown-menu-icon-gapGap between the dropdown chevron icon and the input text.
--srfm-expandable-menu-backgroundBackground of the expandable dropdown panel.
--srfm-gap-between-icon-textGap between a field icon and its adjacent text.
--srfm-flag-section-paddingPadding around the phone flag/dial-code section.
--srfm-multi-choice-horizontal-svg-sizeIcon size in horizontally-laid-out multi-choice options.
--srfm-check-svg-left / --srfm-check-svg-topFine-tune checkmark SVG horizontal and vertical position inside the checkbox container.
--srfm-checkbox-description-margin-leftLeft margin on the description text beside a checkbox.

Background

--srfm-bg-colorForm background color.
--srfm-bg-imageBackground image URL.
--srfm-bg-position / size / repeat / attachmentBackground image position, size, repeat mode, and attachment (fixed/scroll). Individual properties also available as --srfm-bg-position, --srfm-bg-size, --srfm-bg-repeat, --srfm-bg-attachment.
--srfm-bg-gradientBackground gradient value.
--srfm-bg-overlay-colorOverlay color on top of a background image.
--srfm-bg-overlay-opacityOverlay opacity 0–1.
--srfm-bg-overlay-gradientOverlay gradient value.
--srfm-bg-overlay-imageSeparate image layer rendered as the overlay.
--srfm-bg-overlay-position / size / repeat / attachmentOverlay image display properties. Individual properties also available as --srfm-bg-overlay-position, --srfm-bg-overlay-size, --srfm-bg-overlay-repeat, --srfm-bg-overlay-attachment.
--srfm-bg-overlay-blend-modeCSS mix-blend-mode for the overlay layer.

Always prefix your selectors with the form container class. Using .srfm-form-container-{id} .srfm-input-common targets inputs only in your specific form.

Form Structure

SelectorWhat it targets
.srfm-form-containerOutermost wrapper div around the form.
.srfm-form-container-{id}Specific form by post ID - the scoped root for all your CSS.
.srfm-formThe HTML form element.
.srfm-form-titleForm title heading if displayed.
button#srfm-submit-btnThe submit button element.
.srfm-svg-containerWrapper around inline SVG icons rendered inside form fields (prefix/suffix, checkbox mark, etc.).
.srfm-submit-buttonSubmit button wrapper div.
.srfm-submit-wrapInner wrap inside the submit button area.
.srfm-success-boxSuccess message container shown after submission.
.srfm-success-box-descriptionText inside the success message.
.srfm-password-protected-formPassword protection prompt shown before form loads.
.srfm-loaderLoading spinner shown during form submission or async operations.
.srfm-captcha-containerWrapper around CAPTCHA verification widgets.
.srfm-test-mode-noticeBanner shown when a payment gateway is in test/sandbox mode.
.srfm-instant-form-wrn-ctn / .srfm-wrn-text-ctnWarning container and text for instant (embed) forms.
.srfm-welcome-screen / .srfm-welcome-screen-activeConversational form welcome screen and active state. Also available as .srfm-cf-welcome-screen.
.srfm-welcome-heading / .srfm-welcome-messageHeading and body text inside the welcome screen. Also available as .srfm-cf-welcome-heading / .srfm-cf-welcome-message.
.srfm-welcome-image-ctn / .srfm-welcome-imageImage container and image element on the welcome screen. Also available as .srfm-cf-welcome-image-ctn / .srfm-cf-welcome-image.
.srfm-cf-contentContent area wrapper inside a conversational form question.
.srfm-cf-btnPrimary action button inside a conversational form step.
.srfm-start-btnStart button on the conversational form welcome screen.
.srfm-steps-page-titlePage title text displayed at the top of each multi-step page.
.srfm-head-error / .srfm-footer-errorForm-level error banners at the top and bottom.
.srfm-preset-darkAdded to the form container when the dark preset is active.

Field Blocks

SelectorWhat it targets
.srfm-blockEvery field block wrapper, regardless of field type.
.srfm-block-singleA single-column field block.
.srfm-block-wrapInner wrap of a field block.
.srfm-block-content-wrapContent area within a block.
.srfm-block-labelThe field label element.
.srfm-block-legendFieldset legend for checkbox and radio groups.
.srfm-descriptionField help and description text.
.srfm-requiredThe required field asterisk.
.srfm-error-messageThe validation error message.
.srfm-error-wrapWrapper around the error message.
.srfm-hidden-blockHidden fields that do not render visually.
.srfm-block-width-100 / 75 / 66-66 / 50 / 33-33 / 25Column width utility classes applied to block wrappers for multi-column layouts.
.srfm-with-iconApplied to input blocks that include a prefix or suffix icon.
.srfm-char-counter-wrap / .srfm-char-counter / .srfm-char-counter--errorCharacter count display, wrapper, and error state for textarea fields.

Input Elements

SelectorWhat it targets
.srfm-input-commonUniversal input class. Applies to all text, email, URL, number inputs, and textareas.
.srfm-input-textareaTextarea fields only.
.srfm-input-numberNumber fields only.
.srfm-input-phonePhone fields only.
.srfm-input-time-pickerTime picker field input element.
.srfm-input-uploadFile upload input element.
.srfm-input-address-autocompleteAddress autocomplete input element.
.srfm-input-checkboxThe actual checkbox input element.
.srfm-input-gdprThe GDPR acceptance checkbox input.
.srfm-input-focusedAdded by JavaScript when an input is focused.
.srfm-input-hoveredAdded by JavaScript on hover.
.srfm-input-contentContent wrapper inside an input for prefix/suffix fields.
.srfm-input-iconIcon element inside an input that has a prefix or suffix icon.
.srfm-number-prefix / suffixPrefix and suffix text on number inputs.
.srfm-icon-container / .srfm-iconIcon container and SVG inside input fields.

Free Field Types

SelectorWhat it targets
.srfm-dropdown-commonThe dropdown input element.
.srfm-dropdown-common-wrapThe dropdown outer wrapper.
.srfm-cbxCustom checkbox visual element.
.srfm-checkbox-block / .srfm-gdpr-blockCheckbox and GDPR block wrappers.
.srfm-multi-choice-blockMulti-choice field wrapper.
.srfm-multi-choice-singleSingle option card in multi-choice.
.srfm-multi-choice-iconChecked state icon in multi-choice.
.srfm-option-container / .srfm-option-imageOption item and image in multi-choice.
.srfm-address-block / .srfm-address-block-wrapManual address field wrapper and inner container.
.srfm-address-country-wrapCountry selector wrapper inside the address block.
.srfm-address-autocomplete-search-wrap / .srfm-address-autocomplete-map-previewSearch input wrapper and map preview inside the address autocomplete block.
.srfm-dropdown-block / .srfm-dropdown-commonDropdown field block wrapper and shared dropdown element class.
.srfm-html-block / .srfm-html-block-placeholderHTML content block (paid) wrapper and the placeholder shown when the block is empty.
.srfm-email-confirm-blockEmail confirmation second input block wrapper.
.srfm-number-block / .srfm-number-prefix / .srfm-number-suffixNumber field wrapper and its prefix/suffix display elements.
.srfm-classic-upload-labelClassic (button-style) file upload label element.
.srfm-phone-block / .srfm-flag-section-paddingPhone field wrapper and country flag area.
.srfm-richtext / .srfm-quill-editor-focusedRich text editor field and its focused state.

Payment Fields

SelectorWhat it targets
.srfm-payment-field-wrapperOuter wrapper for a payment field block.
.srfm-payment-input-wrapperInner wrapper around the payment amount input.
.srfm-payment-amount-wrapperContainer that holds the displayed amount value.
.srfm-payment-methods-accordionAccordion container for selecting payment method.
.srfm-payment-method-radioIndividual payment method radio option.
.srfm-payment-activeApplied to the currently selected payment method.
.srfm-single-payment-methodWrapper when only one payment method is available.
.srfm-variable-amount-displayDisplays the computed amount for variable-price fields.
.srfm-paypal-button-containerContainer for the rendered PayPal button.

State and Utility Classes

SelectorWhat it targets
.srfm-custom-wp-paragraphWordPress paragraph blocks inside an HTML field.
.srfm-accordion-item / .srfm-accordion-header / .srfm-accordion-contentAccordion structure used in payment method selection.
.srfm-has-dark-bgAdded to blocks when the form background is dark.
.srfm-high-z-indexUtility class that forces a higher stacking context.

Dark Theme

dark-theme.css
/* Replace 456 with your actual form ID */
.srfm-form-container-456 {
  --srfm-color-scheme-primary:        #1d6ef5;
  --srfm-color-scheme-text-on-primary: #ffffff;
  --srfm-color-scheme-text:            #e2e8f0;
  --srfm-color-input-background:       #1e2430;
  --srfm-color-input-background-hover: #252d3d;
  --srfm-color-input-border:           #334155;
  --srfm-color-input-label:            #cbd5e1;
  --srfm-color-input-text:             #f1f5f9;
  --srfm-color-input-placeholder:      #64748b;
  --srfm-color-input-description:      #94a3b8;
  --srfm-error-color:                  #f87171;
  --srfm-error-color-border:           #ef4444;
  --srfm-bg-color:                     #0f172a;
}

Full-Width Submit Button

full-width-btn.css
.srfm-form-container-456 .srfm-submit-button {
  display: flex;
  width: 100%;
}
.srfm-form-container-456 .srfm-submit-button button {
  width: 100%;
  justify-content: center;
}

Compact Form

compact.css
.srfm-form-container-456 {
  --srfm-row-gap-between-blocks: 12px;
  --srfm-input-field-padding:    8px 10px;
  --srfm-input-height:           36px;
  --srfm-label-font-size:        12px;
  --srfm-btn-padding:            8px 20px;
  --srfm-form-padding-top:       16px;
  --srfm-form-padding-right:     16px;
  --srfm-form-padding-bottom:    16px;
  --srfm-form-padding-left:      16px;
}

Gradient Submit Button

gradient-btn.css
.srfm-form-container-456 button#srfm-submit-btn {
  background: linear-gradient(135deg, #1d6ef5, #6366f1) !important;
  border: none;
}
.srfm-form-container-456 button#srfm-submit-btn:hover {
  background: linear-gradient(135deg, #1251c4, #4f46e5) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(29,110,245,.4);
}

Targeting - Instant Form vs Embedded

targeting.css
/* Instant Form standalone page only */
.single-sureforms_form.postid-456 {
  --srfm-color-scheme-primary: #10b981;
}

/* Same form embedded on other pages */
body:not(.single-sureforms_form) .srfm-form-container-456 {
  --srfm-color-scheme-primary: #1d6ef5;
}

Per-Side Field Borders and Shadows PAID

Advanced Button Variables PAID

Multi-Step and Page Break PAID

Paid Field Type Variables PAID

Address Field Typography PAID

Checkbox and Multi-Choice Typography PAID

Misc Paid Variables PAID

Paid Dropdown Granular Variables PAID

Paid Plan Selectors PAID

.srfm-custom-stylings must be present on the form container for per-side border and shadow variables to work. It is added automatically when any paid plan is installed and active.

Underline-Only Inputs PAID

underline-inputs.css
.srfm-form-container-456.srfm-custom-stylings {
  --srfm-field-border-width-top:    0px;
  --srfm-field-border-width-right:  0px;
  --srfm-field-border-width-bottom: 2px;
  --srfm-field-border-width-left:   0px;
  --srfm-field-border-radius-top:   0px;
  --srfm-field-border-radius-right: 0px;
  --srfm-field-border-radius-bottom:0px;
  --srfm-field-border-radius-left:  0px;
  --srfm-field-box-shadow-normal:   none;
  --srfm-field-box-shadow-focus:    none;
  --srfm-color-input-background:    transparent;
}

Multi-Step Progress Theme PAID

multi-step.css
.srfm-form-container-456 {
  --srfm-page-break-indicator-size:       28px;
  --srfm-page-break-steps-filled:         #1d6ef5;
  --srfm-page-break-steps-unfilled:       #e2e8f0;
  --srfm-page-break-indicator-text-color: #ffffff;
  --srfm-page-break-connector-active:     #1d6ef5;
  --srfm-page-break-connector-pending:    #e2e8f0;
  --srfm-page-break-unfilled-progress:    #e2e8f0;
  --srfm-page-break-next-btn-bg-normal:   #1d6ef5;
  --srfm-page-break-next-btn-bg-hover:    #1251c4;
  --srfm-page-break-back-btn-background:  #f1f5f9;
  --srfm-page-break-back-btn-text-color:  #374151;
}

Password Strength Colors PAID

password-strength.css
.srfm-form-container-456 {
  --srfm-password-strength-weak:               #ef4444;
  --srfm-password-strength-medium:             #f59e0b;
  --srfm-password-strength-strong:             #10b981;
  --srfm-password-strength-weak-border-color:  #ef4444;
  --srfm-password-strength-strong-border-color:#10b981;
}

Gradient Button via Paid Mode PAID

gradient-btn-paid.css
/* Enable gradient in the form editor, then override the gradient value */
.srfm-form-container-456.srfm-custom-stylings .srfm-button.srfm-btn-bg-gradient {
  --srfm-button-background-gradient-normal: linear-gradient(135deg, #1d6ef5, #6366f1);
  --srfm-button-background-gradient-hover:  linear-gradient(135deg, #1251c4, #4f46e5);
  --srfm-button-text-color-normal: #ffffff;
  --srfm-button-text-color-hover:  #ffffff;
}

Disclaimer: This is an unofficial reference tool created by Nahnu Media and is not affiliated with, endorsed by, or maintained by the SureForms team. It is provided free of charge as a community resource. All CSS variable names, selectors, and behaviors are sourced from the SureForms plugin source code and are subject to change without notice. Use this reference at your own risk. Nahnu Media makes no guarantees about accuracy, completeness, or fitness for any particular purpose. Always test your CSS in a staging environment before deploying to production.

AI Prompt Builder

Generate a complete Claude prompt loaded with the full CSS reference, your form HTML, and your design goals.

Reference Stats
Versionv2.10.1
Free variables55+
Paid variables50+
Total selectors170+
Our Plugin Portfolio

Like What We Build?
Check Out Our Plugins

This tool is one of many things we build for the WordPress community. Nahnu Plugins is our growing suite of professional-grade WordPress plugins.

Browse Nahnu Plugins

Professional WordPress plugins for CDN management, consent, performance, and more.

How It Works

SureForms CSS in
Three Concepts

SureForms uses CSS custom properties prefixed with --srfm-*. Understanding these three things gets you styling in minutes.

Variables Drive the Style

SureForms generates a scoped style block per form that sets --srfm-* CSS variables. Override them to restyle any part of your form without touching plugin files.

Find Your Form ID

Right-click your form and click Inspect. Find the outermost div with a class starting with srfm-form-container-. The number at the end is your form ID and CSS scope.

Copy and Paste

Find the variable or selector in the reference, copy it, set your value and paste it into your form's custom CSS, Appearance > Additional CSS, or your child theme's style.css.

Work With Us

Need Help Styling
Your SureForms?

If you want someone to handle the CSS for you, Nahnu Media builds and maintains WordPress sites for growing brands. Get in touch and we will take care of it.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only