Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

Style Options Conditions

1 sites No security coverage
View on drupal.org

This module allows you to selectively show style options for paragraphs based on defined conditions. Style options will only appear in the editor and affect the final output if these specified conditions are met, making them context-aware without requiring custom code.

Style Options Conditions extends the Style Options module with a condition plugin system for paragraph types. Style options are only shown in the editor and applied to rendered output when all declared conditions pass, enabling context-aware option visibility without writing custom PHP per paragraph type.

Conditions are declared directly in your *.style_options.yml file alongside the options they guard. Multiple conditions on a single option are ANDed — all must pass. New condition types can be added by any module using the plugin system.

Included submodule: Style Options Conditions: Layout

The style_options_conditions_layout submodule provides the layout condition plugin, which evaluates visibility based on Layout Paragraphs context. layout_paragraphs is not a hard dependency — the plugin checks for the module at runtime and fails open if it is not installed.

Example use cases

  • Show a "Container Width" option only when a paragraph is placed at the top level of a page, not inside a grid
  • Show a "Column Span" option only when a paragraph is inside a specific multi-column layout
  • Show a layout-specific option only in certain regions (e.g. header and footer, but not content)

Activity

Tracked releases
2
Tracked since
May 2026
Latest release
3 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable May 22, 2026
1.0.x-dev Dev May 22, 2026