Levels Block Editor Styles for Oxygen Builder
Levels Block Editor Styles for Oxygen Builder automatically injects your Oxygen Builder CSS into the WordPress block editor, ensuring that what you see in the editor matches what appears on the frontend.
Features
- Automatic Style Detection – Automatically finds and loads all relevant Oxygen CSS files
- Scoped Styling – All CSS is scoped to prevent affecting editor UI elements
- Reusable Block Support – Detects and loads styles for embedded reusable blocks
- Smart Context Detection – Only loads in the block editor for users with edit permissions
- Performance Optimized – Live-read approach with minimal overhead
- Responsive Images – Automatically converts img tags to responsive versions with srcset and sizes attributes
- Per-Image Size Control – Use the
data-image-sizeattribute to override the default image size per element - Settings Page – Configure features under Oxygen > Block Editor Styles
Block Editor Styles
The plugin collects CSS from four sources:
- oxygen.css – Core Oxygen framework styles
- universal.css – Site-wide Oxygen styles
- Page-specific CSS – Cached page styles
- Reusable block CSS – Styles for embedded reusable blocks
All CSS selectors are automatically rewritten to be scoped within the editor content area to prevent affecting the WordPress admin UI.
Responsive Images
When enabled, the plugin automatically replaces <img> tags in your content with responsive versions that include srcset and sizes attributes. This provides optimized images for all screen sizes without any manual work.
How to use in Oxygen Builder:
- Go to Oxygen > Block Editor Styles in the WordPress admin
- Enable “Responsive Images”
- Choose a default image size (e.g. “large”)
- All images in your content will now automatically get srcset attributes
Per-image size override:
You can override the default size on individual images using the data-image-size attribute:
- Select your Image element in Oxygen
- Go to Advanced > Attributes
- Add attribute:
data-image-size - Set value to any registered image size:
thumbnail,medium,medium_large,large, orfull
The data-image-size attribute is automatically removed from the final HTML output – it only serves as a control attribute for the plugin.
Requirements
- Oxygen Builder 4.x (must be installed and activated)
- WordPress 5.8 or higher
- PHP 7.4 or higher
Related Plugins
Looking to speed up your Oxygen workflow? Check out Ready Made Oxygen Integration – Turn Figma designs into editable Oxygen Builder sections – copy & paste, just like that.
Optional Dependencies
For 100% reliable CSS scoping, you can install the CSS parser library via Composer:
composer install --no-dev
Without the library, the plugin uses a regex fallback that works for most cases.
Credits
Developed by Levels Branding & Webdevelopment OG
