Topics

On this page

Last updated on Dec 11, 2024

Handling responsive designs

While working on some Gutenberg/Site-Editor projects, I have realized that responsive designs may be the hardest thing. Gutenberg has certain limitations which may make it hard to create responsive designs without custom coding or third-party plugins. Let’s explore how to create truly responsive WordPress experiences.

Mobile-First Design Approach

Starting with mobile forces us to focus on content priority and core functionality. I’ve seen many designs fail because they were conceived for desktop and hastily adapted for mobile.

Content Prioritization:

Desktop designs often include:

Mobile focuses on:

However, sometimes, it may not make sense to go mobile-first. During a revamp project, we analyzed the traffic reports and realized that most of the traffic came from desktop. Therefore, we focused our efforts on desktop designs and then worked towards mobile designs.

Stacking Behavior

One of WordPress’s strengths is automatic block stacking on mobile, but this needs careful planning.

Consider this typical hero section in Figure 5.1. This design requires custom coding or third-party plugins due to an unnatural element reflow.

custom coding for unnatural element flow.
Figure 5.1

Common Stacking Issues:

Design-Development Balance

Through numerous WordPress projects, I’ve learned where to push for pixel-perfect implementation and where to compromise.

Worth Perfecting:

Acceptable Variations:

Navigation Patterns

Mobile navigation deserves special attention – it’s often the make-or-break element of mobile usability.

Effective Patterns:

Navigation Patterns
Figure 5.2

Figure 5.2 shows a typical menu over multiple breakpoints.

Mobile Accessibility

Touch interaction requires different considerations from desktop design.

Touch Targets:


Contributor

Danish Shakeel

Danish

Danish Shakeel

Senior Software Engineer