09. Breakpoints vs Viewport

The Basics of Vev - Lesson 09.mp4

The canvas is the foundation for bringing your design to life and where you craft your content before it goes out in the world. So it’s important to understand how breakpoints work so you can work efficiently to ensure your design is responsive.

  • Breakpoints vs Viewport

  • The Safe Zone

  • Fluid Breakpoints

  • Inheriting Styling Properties


Breakpoints vs Viewport

There are two key design principles when working with responsive design. Breakpoints and the Viewport. To put it briefly:

  • The viewport is the window through which a user views your webpage.

  • The breakpoint is a design trigger that changes how content is displayed when the viewport reaches a specific width.

So how do these two principles relate to one another? Let’s take a look at the canvas in the design editor to get a better idea.

The canvas is a preview of the viewport that a user might see when viewing your design. In the editor, you can adjust the canvas size to any width and height you prefer. However, only the width of the viewport will impact which breakpoint is displayed.

Using the default breakpoint setup as an example, here we can see which breakpoint is being displayed when the width of the viewport is within a certain range:

  • Desktop: 1024px and above

  • Tablet: 600px to 1023px

  • Mobile: 320px* to 599px

The breakpoints outlined here will be visible when the width of the viewport (or screen) matches the range of the breakpoint. So, for example if the screen size viewing the Vev project is 1440px wide, then this will fall into the desktop breakpoint as this is 1024px and above. Another example is if the screen size is 400px wide, then this will show the mobile breakpoint as this is set to 599px and below.


The Safe Zone

The Safe Zone is the space on the canvas in-between the soft green areas displayed on the left and right sides of the canvas. You will notice this when viewing your project inside the design editor.

When you build your content in the Design Editor, especially with elements, you'll need to position them to be inside of the Safe Zone to ensure nothing is cut off. Placing an element outside of the Safe Zone runs the risk of elements being cut off on some viewports.

Safe zones are also a helpful visual guide to indicate the minimum size for a particular breakpoint. For example, on the canvas, we're currently in the desktop viewport. If we adjust the viewport width by dragging the handle outside the canvas and shrink it, once the width drops below 1024px, the layout will switch to the next breakpoint. In this case, the next breakpoint is the tablet view. You can see this change reflected at the top-left of the canvas, where the breakpoint label updates, and a new safe zone appears. If we reduce the size even further, dropping below 600px will switch the layout to the mobile breakpoint.

It’s important to test different viewport when designing in Vev to ensure that your project looks great across a variety of different screen sizes.


Fluid Breakpoints

You might have been asking; “but what if I don’t want to have a safe zone?” And in this case, I’d like to introduce you to Fluid breakpoints.

Fluid breakpoints allow you to remove the safe zone to create truly full-width designs. To turn this setting on, head over to the project settings tab in the bottom-left hand corner of the editor. From this menu you’ll see the option for managing the project breakpoints. You can manage each breakpoint to either be “fixed” which is the default option with safe zones, or you can select “fluid”. When activating “fluid” on a breakpoint, percentage widths work in relation to the viewport width instead of the safe zone.

Here is an example of a fixed breakpoint with an element set to 100% width. Here you can see it will be 100% of the safe zone and when we change the width of the viewport it will only fill the safe zone. But if compare this to fluid breakpoint, we can see 100% will sit edge to edge of the screen, no matter the size of the screen.


Inheriting Styling Properties

It’s worth understanding how the inheritance of styling properties work. Using desktop-first as an example: when working from this main breakpoint, all styling changes made to the desktop breakpoint, will cascade down to tablet and mobile.

If we change the view to the tablet breakpoint, and then make a change to a style option we will see that the changes cascade down to the mobile device but the main desktop breakpoint remains unchanged. The same can be said when making a change directly to the mobile device, when a change is made here it will only be for this smallest breakpoint. Desktop and tablet will remain unchanged.


→ Next up, let’s explore: Sizing & Constraints