Webflow explained
Webflow variables and breakpoints
Variables store a style once and then reuse it. Breakpoints determine how the layout changes at different screen widths. Together they keep the site consistent.
In brief
- Variable types: colour, size, percentage, number and font family.
- Changing a variable updates every instance where it’s used.
- Variables can use functions such as calc() and clamp().
- Breakpoints cascade from the desktop base in both directions.
- Added larger breakpoints can’t be removed.
Variables
A variable is a value that you reuse throughout the site. You create them in the Variables panel and then apply them in the Style panel and the Interactions panel. Colour variables cover text, background, border and gradient colours. Size variables cover layout, spacing, position, dimensions, typography, borders, blur radii and shadows. Percentage and number variables cover all the other properties (with the caveat that z-index must be an integer and font weights must be values from 1 to 1000). Font variables store a font family. You can use functions such as calc() and clamp() in the values. Webflow has migrated the old swatches into colour variables. Webflow is also warning that the CSS names of the non-base collection variables are about to change, so any custom code that references them may need to be updated.
Breakpoints
The Designer starts at the desktop base, and styles then cascade up to 1280, 1440 and 1920 px and down to tablet, mobile landscape and mobile portrait. Tablet kicks in at 991 px and below, mobile landscape at 767 px and below and mobile portrait at 479 px and below. The larger breakpoints (1280, 1440 and 1920 px) apply at those widths and above. You can override any inherited style at any breakpoint. The blue and orange labels in the Style panel show where a style is coming from. Expand Canvas shows you all the breakpoints at once.
Working with them
Design on desktop first and then work down. You can’t remove a breakpoint once you’ve added it, but you can clear the unique styles associated with that breakpoint by Option-clicking (Mac) or Alt-clicking (Windows) the styles that have the blue label.
For the meeting
Questions teams ask
Can an interaction make use of variables?
Yes. Variables are available in the Interactions panel, and Webflow’s variable actions (which animate a variable over time) are covered under Interactions with GSAP. See Webflow interactions, explained.
Does a mobile style cascade up?
No. Styles set on mobile don’t flow back to tablet or desktop.
Continue with the next task
Choose the page that will assist you with your next decision.