Make WordPress Core


Ignore:
Timestamp:
02/20/2024 11:20:22 AM (12 months ago)
Author:
youknowriad
Message:

Editor: Fix instance element styles for links applying to buttons.

These changes fix the selector used by block instance element styles for links so they do not get incorrectly applied to buttons.

Props aaronrobertshaw, freewebmentor, mukesh27.
Fixes #60557.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/elements.php

    r56828 r57664  
    167167        ),
    168168        'link'    => array(
    169             'selector'       => ".$class_name a",
    170             'hover_selector' => ".$class_name a:hover",
     169            'selector'       => ".$class_name a:where(:not(.wp-element-button))",
     170            'hover_selector' => ".$class_name a:where(:not(.wp-element-button)):hover",
    171171            'skip'           => $skip_link_color_serialization,
    172172        ),
Note: See TracChangeset for help on using the changeset viewer.