From 4aad5e33db303dfd6da3cb1077d37e4d3e9ee794 Mon Sep 17 00:00:00 2001 From: David Arenas Date: Wed, 29 Jan 2025 17:17:48 +0100 Subject: [PATCH] iAPI Router: Fix CSS rule order in some constructed style sheets (#68923) * Add failing test * Place CSS rules in order Co-authored-by: DAreRodz Co-authored-by: luisherranz Co-authored-by: Mamaduka Co-authored-by: SainathPoojary Co-authored-by: sethrubenstein --- .../router-styles-wrapper/render.php | 17 +++++++++++ .../router-styles-wrapper/style-from-link.css | 7 +++++ .../interactivity-router/src/assets/styles.ts | 5 ++-- .../specs/interactivity/router-styles.spec.ts | 29 +++++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/style-from-link.css diff --git a/packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/render.php b/packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/render.php index 6373e8e9bc235b..683db9eea5c4c7 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/render.php +++ b/packages/e2e-tests/plugins/interactive-blocks/router-styles-wrapper/render.php @@ -7,6 +7,17 @@ * @phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable */ +add_action( + 'wp_enqueue_scripts', + function () { + wp_enqueue_style( + 'wrapper-styles-from-link', + plugin_dir_url( __FILE__ ) . 'style-from-link.css', + array() + ); + } +); + $wrapper_attributes = get_block_wrapper_attributes(); ?>
> @@ -38,6 +49,12 @@

All

+ +
+ Rule order checker +

I should remain green

+
+