Style a career portal with custom CSS
Add your own CSS to a career portal so it matches your brand's fonts and colors. The CSS applies to every page of the portal, including job pages and the application form. This is useful when you keep your own career site and link candidates only to the flair application form.
HR Admins and Salesforce Admins with access to the Career Portal record in Salesforce. Candidates see the styled career portal.
Before you begin
- You have access to the portal's Career Portal record in Salesforce.
- You set your brand color in Primary Color and your button shape in Button Corner Radius. Buttons and accents use these settings, not your CSS.
- Someone on your team can write CSS, or you start from one of the sample themes.
Add custom CSS to a career portal
- In Career Portals Setup, open Details for the portal.
- Scroll to Custom CSS. It follows Allowed IP Ranges.
- Paste your CSS into Custom CSS.
- Click Save. flair applies the CSS to every page of the portal.
- Reload the career portal to check the result.
Changes may take up to a few minutes to appear because the portal is cached.
To load a web font, such as a Google Font, use @import. The @import line must be the first line of your CSS:
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
Remove custom CSS
- To return to the default look, empty Custom CSS and click Save.
Change fonts and colors with variables
Variables are the simplest way to restyle the portal. Set them on :root. You don't need !important.
| Variable | What it changes | Default |
|---|---|---|
--cp-font-family | Body text, form inputs, and buttons | System font |
--cp-heading-font-family | Headings, such as the job title | Same as --cp-font-family |
--cp-color-text | Main text color, including the job title. Secondary gray texts, such as the labels above the job details and Apply to this job, keep their color. Use hooks for those. | Black |
--cp-color-background | Page background | White |
--cp-input-background | Background of inputs, dropdowns, and file pickers | White |
--cp-input-border-color | Border of inputs, dropdowns, and file pickers | Light gray |
--cp-input-radius | Corner radius of inputs, dropdowns, and file pickers | 0.25rem (4px) |
Use the read-only variables
These variables are filled from the portal's settings. Use them in your own rules, for example color: var(--cp-color-primary);:
| Variable | Value |
|---|---|
--cp-color-primary | The Primary Color setting |
--cp-button-radius | The Button Corner Radius setting |
Changing these variables in your CSS doesn't recolor or reshape buttons. To change the button color, update Primary Color. Your CSS can't override the button background color.