Skip to main content

Overview

Visual Portfolio includes a comprehensive responsive design system with customizable breakpoints for different device sizes. The system ensures your portfolios look great on all screen sizes from mobile phones to large desktop displays.
Breakpoints are managed by the Visual_Portfolio_Breakpoints class at classes/class-breakpoints.php:15

Default Breakpoints

Visual Portfolio uses five standard breakpoints:

Breakpoint Reference

Default: 320pxDevices:
  • Small mobile phones
  • Portrait orientation
Typical Usage:
  • Single column layouts
  • Stacked elements
  • Minimal spacing

Getting Breakpoints

Retrieve All Breakpoints

Get Default Breakpoints

Customizing Breakpoints

Breakpoints can be customized using WordPress filters:

Override Individual Breakpoints

Override Default Values

Breakpoint Methods

Each breakpoint has dedicated getter methods:
Default: 320pxFilters:
  • vpf_default_breakpoint_xs
  • vpf_breakpoint_xs
Default: 576pxFilters:
  • vpf_default_breakpoint_sm
  • vpf_breakpoint_sm
Default: 768pxFilters:
  • vpf_default_breakpoint_md
  • vpf_breakpoint_md
Default: 992pxFilters:
  • vpf_default_breakpoint_lg
  • vpf_breakpoint_lg
Default: 1200pxFilters:
  • vpf_default_breakpoint_xl
  • vpf_breakpoint_xl

Responsive Controls

Many portfolio settings support per-breakpoint configuration:

Columns

Items Gap

Slider Items Per View

CSS Variables

Breakpoints are exposed as CSS custom properties:

Using in Custom CSS

JavaScript Integration

Breakpoints are available in JavaScript:

Layout-Specific Responsive Behavior

Grid & Masonry

Tiles

Justified

Slider

Mobile Optimization

Visual Portfolio supports touch events:
  • Swipe for sliders
  • Pinch to zoom in lightbox
  • Touch-friendly navigation
Mobile-specific optimizations:
  • Lazy loading images
  • Reduced animation complexity
  • Optimized asset delivery
  • Hardware acceleration
Automatic image sizing:

Settings Integration

Breakpoints are used in global settings:

Best Practices

Mobile-First

Design for mobile devices first, then enhance for larger screens:
  • Start with single column
  • Progressive enhancement
  • Touch-friendly targets

Test Thoroughly

Test on actual devices:
  • Various screen sizes
  • Different orientations
  • Multiple browsers

Content Prioritization

Show most important content first:
  • Critical content visible
  • Hide less important elements
  • Use progressive disclosure

Performance

Optimize for mobile networks:
  • Lazy load images
  • Minimize assets
  • Reduce HTTP requests

Testing Responsive Design

Browser DevTools

  1. Open browser DevTools (F12)
  2. Toggle device toolbar
  3. Select device or custom size
  4. Test interactions and layouts

WordPress Site Health

Real Device Testing

Recommended test devices:
  • iPhone SE (375px)
  • iPhone 12 Pro (390px)
  • iPad (768px)
  • iPad Pro (1024px)
  • Desktop (1920px)

Accessibility Considerations

Ensure responsive designs maintain accessibility:
  • Sufficient touch target sizes (44x44px minimum)
  • Readable font sizes (16px minimum)
  • Adequate contrast ratios
  • Keyboard navigation support
  • Visual_Portfolio_Breakpoints - Breakpoint management (classes/class-breakpoints.php)
  • Visual_Portfolio_Controls - Responsive control fields
  • Visual_Portfolio_Assets - Responsive asset loading

See Also

Layouts

Configure responsive layouts

Assets

Responsive asset management

Settings

Global responsive settings

Filters

Breakpoint filter hooks