Which of the following guidelines should be followed to create white space?

This page is not being actively maintained. Links within the documentation may not work and the information itself may no longer be valid. The last revision to this document was made on April 20, 1999

8 - White Space

8.1 Blank Lines

Blank lines improve readability by setting off sections of code that are logically related.

Two blank lines should always be used in the following circumstances:

  • Between sections of a source file
  • Between class and interface definitions

One blank line should always be used in the following circumstances:

  • Between methods
  • Between the local variables in a method and its first statement
  • Before a block (see section 5.1.1) or single-line (see section 5.1.2) comment
  • Between logical sections inside a method to improve readability

8.2 Blank Spaces

Blank spaces should be used in the following circumstances:

  • A keyword followed by a parenthesis should be separated by a space. Example:



        while (true) {
           ...
       }

Note that a blank space should not be used between a method name and its opening parenthesis. This helps to distinguish keywords from method calls.

If you overhear a design QA session between a product designer and an engineer, odds are you’ll hear the product designer say something like this:

“Can you add 8 pixels of padding here and also there? … Actually, let’s make it 16 pixels.”

At Wayfair, we are lucky enough to work alongside engineers who are understanding and open to our continuous requests. However, I’m sure some engineers see us as “pixel crazy”. And to be fair, a few of us are. But trust me, there is a method to our madness.

So, why are product designers so picky about padding?

Padding, also known as white space, is the empty space between and around individual elements of a page layout; these elements could be pieces of copy, images, cards, buttons, icons, etc. When used correctly, white space brings visual clarity and balance to a layout.

Think of white space as a breath of fresh air. Just as humans need air to breathe, designs need white space to breathe. Yes, this may sound corny. But I stand by this.

How does Wayfair tackle white space?

As I mentioned earlier, there is a method to our madness. At Wayfair, our product design team follows a strict padding rule to ensure consistency and easy maintenance across site. This rule is embedded into our design toolkit, a collection of user interface design elements that are the building blocks for all of our site designs. The rule states that the spacing between every design element should be a multiple of 8 pixels; this means that the spacing could be 8, 16, 24, 32, 40 pixels and so on. This rule brings intentionality to our use of white space and creates visual consistency across our site experience.

“Rule of 8” in actionHow can white space improve the user experience?

It helps maintain focus

White space is a tool that helps guide the user experience. We use white space to create focus points for our users drawing their attention to certain elements. The greater the padding around a particular element on a page, the greater the emphasis on that element. In the example below, focus is clearly maintained on the call to action and the primary messaging.

Aaaah, drink in all that white space

Unfortunately, we do not always have the luxury of this kind of white space. This is a rarity, so enjoy it while it lasts. On a typical e-commerce page, a product designer is faced with the challenge of balancing multiple calls to action, secondary links, imagery, pieces of copy—the list goes on. The example below showcases our product details page (PDP), a page that demands a lot from our user. Strategically placed white space helps our user navigate the visual noise on this page and potentially increases conversion.

White space helps focus the user on each interaction area on the PDP

It improves visual organization

In addition to highlighting areas of focus, white space plays a huge role in the visual organization of a page. White space is essential to clarifying relationships and separating sections with different purposes; it is also the driving force behind the Gestalt Principle of Proximity, which states:

Objects or shapes that are close to one another appear to form groups.

Clearly defining different parts of a page increases our user’s confidence in the site experience; forcing our user to think through a confusing layout is something every product designer wants to avoid. The following example showcases Wayfair’s homepage, a page that could easily appear overwhelming if white space was not used properly.

White space clearly defines the different sections on Wayfair’s homepage

It increases readability

In addition to defining the organization of a page, white space can greatly improve the readability of a page. It’s important to be mindful about the spacing between lines of copy—and even letters—as thoughtful spacing will make it easier for the user to digest. More spacing is generally better, but too much could potentially make lines of copy feel disconnected. It’s all about finding the right balance.

Medium (yes, this site) does a great job of considering white space in its copy settings. If you’re reading this article on a larger screen, check out the vastness of white space in the margins. Medium knows what’s up.

What are common concerns around white space?

“White space is wasted space!”

This is a myth. White space is not wasted space. There is a tendency for some of our stakeholders to fill white space with more content when it is not always necessary. Everyone has heard the saying “less is more”. This applies to content on any given page, where less visual noise makes for a better user experience. On Wayfair’s checkout flow (seen below), the white space underneath the main call to action may be vast but it beautifully balances and supports the elements on this page.

Large areas of white space do NOT need to be filled with content

“White space pushes content below the fold and users will not see this content!”

Users will scroll and scroll some more. I promise you. There is this myth that users will not always scroll to see all the content on a page. Thus, some of our stakeholders request that the majority of a page’s content lives above the fold.

Users have evolved and become more comfortable with scrolling. There are definitely certain elements that are best suited above the fold, but it’s important not to limit the use of white space to accommodate for the fold.

Conclusion

Every product designer wants to design the best possible user experience; with this in mind, white space is a powerful tool that can help achieve this from a user interface perspective. It should be heavily integrated into the design process.

Think you’re using too much white space? There’s a good chance you’re not. If anything, you’re probably not using enough. When in doubt, add more white space…

Which of the following guidelines should you follow to create a strong opening for your presentation?

Which of the following guidelines should you follow to create a strong opening for your presentation? Personalize your opening to the needs and interests of the audience.

Which of the following are effective guidelines for achieving a natural writing style that is easy to read?

Which of the following are effective guidelines for achieving a natural writing style that is easy to read? Use short, simple words.

Which of the following are ways to build credibility for your report?

Which of the following is a way to build credibility for your report? Use specific examples, supporting statistics, and authoritative quotes to lend credibility to the seriousness of the problem.

Which of the following is a function of telepresence?

Which of the following is a function of telepresence? It creates virtual meetings that are almost lifelike.