Viewport Presets & Extraction Settings
PerfBee's Critical CSS feature extracts the above-the-fold CSS of your pages, which you then inline in your page's head. The extraction form has two groups of settings: Viewport Settings, which set the screen sizes, and Advanced Settings, which change the CSS output. This article explains both.
What are Viewport Presets?
Every extraction runs twice, once for a mobile screen and once for a desktop screen. A viewport preset fills in both screen sizes for a device with one click.
Device Presets
The Viewport Settings card offers these presets:
- iPhone 12: Mobile: 390x844, Desktop: 1920x1080.
- iPhone SE: Mobile: 375x667, Desktop: 1920x1080.
- iPad: Mobile: 768x1024, Desktop: 1920x1080.
- MacBook: Mobile: 375x667, Desktop: 1440x900.
- Desktop: Mobile: 375x667, Desktop: 1920x1080.
- Custom: Enter your own mobile and desktop width and height.
When the page opens, the sizes are 375x667 for mobile and 1920x1080 for desktop.
Extraction Settings Explained
The Advanced Settings card changes the CSS output:
- Minify CSS: Compresses the CSS output, reducing file size. On by default.
- Ignore @import: Skips
@importrules. - Ignore @font-face: Skips
@font-facerules.
PerfBee always leaves @keyframes and @charset rules out of the critical CSS.
Using Custom Sizes
To extract critical CSS for your own screen sizes:
- Navigate to the PerfBee Dashboard and select Critical CSS in the sidebar.
- Open Viewport Settings and choose Custom.
- Enter the mobile and desktop width and height.
- Click Extract Critical CSS.
Your settings are not saved as a preset, so set them again for each extraction. Scheduled CSS checks always use 375x667 and 1920x1080 with the default settings.
For more information on PerfBee's features, visit our documentation.