Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function tear_down() {
*
* @ticket 59555
* @ticket 60557
* @ticket 65538
*
* @covers ::wp_render_elements_support_styles
*
Expand Down Expand Up @@ -185,6 +186,21 @@ public function data_elements_block_support_styles() {
),
'expected_styles' => '/^.wp-elements-\d+ .wp-element-button, .wp-elements-\d+ .wp-block-button__link' . $color_css_rules . '$/',
),
'button hover styles are skipped without a hover selector' => array(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. These tests are failing. What's that telling us about the state of trunk 🤔

'color_settings' => array( 'button' => true ),
'elements_styles' => array(
'button' => array(
'color' => $color_styles,
':hover' => array( 'color' => $color_styles ),
),
),
/*
* Only the base button rule should be emitted. The button element
* type has no `hover_selector`, so the `:hover` object must be
* ignored rather than triggering an undefined array key warning.
*/
'expected_styles' => '/^.wp-elements-[a-f0-9]{32} .wp-element-button, .wp-elements-[a-f0-9]{32} .wp-block-button__link' . $color_css_rules . '$/',
),
'link element styles are applied' => array(
'color_settings' => array( 'link' => true ),
'elements_styles' => array(
Expand Down
Loading