Styles
Customize the look and feel of Elements with Styles. Styles, also referred to as Classes in the Designer, save styling information that can be applied to as many elements as you want across a site.
Working with styles
Create a style
To create a style, you need to provide a unique name. The Webflow API prevents creating styles with duplicate names to maintain uniqueness across your project.
Add style properties
Add CSS properties to a style. Refer to this list of Style Properties for a full index of properties that can added to a style in Webflow.
You can add properties to a style in two ways:
Set a single property
Set multiple properties
The set property
method requires you to pass a single property name and its corresponding value as string
parameters. Additionally, you can include an optional options
parameter, which we cover below.
Responsive styling with breakpoints and pseudo states
Webflow’s responsive design features enable customization of style properties for different contexts, such as varying screen sizes or specific states like :hover
or :active
.
Pass the options
parameter when setting style properties to customize the style for different breakpoints and pseudo-states.
-
BreakpointId
: Identifies the responsive breakpoint to get styles for. -
PseudoStateKey
: Specifies a CSS pseudo-class to get styles for.
Example