From b68d3949fed1e343cd610d4e1e4190fde5e4df14 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:35:06 +0300 Subject: [PATCH] Styles: lower specificity of figcaption style to allow theme.json override (#62689) --- packages/block-library/src/audio/style.scss | 2 +- packages/block-library/src/audio/theme.scss | 2 +- packages/block-library/src/embed/style.scss | 2 +- packages/block-library/src/embed/theme.scss | 2 +- packages/block-library/src/image/style.scss | 2 +- packages/block-library/src/table/theme.scss | 2 +- packages/block-library/src/video/style.scss | 2 +- packages/block-library/src/video/theme.scss | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/audio/style.scss b/packages/block-library/src/audio/style.scss index 1b3d705dda019..340ff3ff65f3f 100644 --- a/packages/block-library/src/audio/style.scss +++ b/packages/block-library/src/audio/style.scss @@ -4,7 +4,7 @@ // Supply caption styles to audio blocks, even if the theme hasn't opted in. // Reason being: the new markup, , are not likely to be styled in the majority of existing themes, // so we supply the styles so as to not appear broken or unstyled in those themes. - figcaption { + :where(figcaption) { @include caption-style(); } diff --git a/packages/block-library/src/audio/theme.scss b/packages/block-library/src/audio/theme.scss index 2744d36e74ca6..0fc32a56592bd 100644 --- a/packages/block-library/src/audio/theme.scss +++ b/packages/block-library/src/audio/theme.scss @@ -1,4 +1,4 @@ -.wp-block-audio figcaption { +.wp-block-audio :where(figcaption) { @include caption-style-theme(); } diff --git a/packages/block-library/src/embed/style.scss b/packages/block-library/src/embed/style.scss index 31e248ec006dc..2776b404b853e 100644 --- a/packages/block-library/src/embed/style.scss +++ b/packages/block-library/src/embed/style.scss @@ -25,7 +25,7 @@ // Supply caption styles to embeds, even if the theme hasn't opted in. // Reason being: the new markup, figcaptions, are not likely to be styled in the majority of existing themes, // so we supply the styles so as to not appear broken or unstyled in those. - figcaption { + :where(figcaption) { @include caption-style(); } diff --git a/packages/block-library/src/embed/theme.scss b/packages/block-library/src/embed/theme.scss index e809a783b9c81..81bcb9972f3c3 100644 --- a/packages/block-library/src/embed/theme.scss +++ b/packages/block-library/src/embed/theme.scss @@ -1,4 +1,4 @@ -.wp-block-embed figcaption { +.wp-block-embed :where(figcaption) { @include caption-style-theme(); } diff --git a/packages/block-library/src/image/style.scss b/packages/block-library/src/image/style.scss index 40ffe0cd0e61c..02788be150c95 100644 --- a/packages/block-library/src/image/style.scss +++ b/packages/block-library/src/image/style.scss @@ -78,7 +78,7 @@ // Supply caption styles to images, even if the theme hasn't opted in. // Reason being: the new markup, , are not likely to be styled in the majority of existing themes, // so we supply the styles so as to not appear broken or unstyled in those themes. - figcaption { + :where(figcaption) { @include caption-style(); } diff --git a/packages/block-library/src/table/theme.scss b/packages/block-library/src/table/theme.scss index d42e79b02b496..c86da9c7f731f 100644 --- a/packages/block-library/src/table/theme.scss +++ b/packages/block-library/src/table/theme.scss @@ -6,7 +6,7 @@ word-break: normal; } - figcaption { + :where(figcaption) { @include caption-style-theme(); } } diff --git a/packages/block-library/src/video/style.scss b/packages/block-library/src/video/style.scss index e8d99186f9f7a..06c0dfd9cdd46 100644 --- a/packages/block-library/src/video/style.scss +++ b/packages/block-library/src/video/style.scss @@ -19,7 +19,7 @@ // Supply caption styles to videos, even if the theme hasn't opted in. // Reason being: the new markup, , are not likely to be styled in the majority of existing themes, // so we supply the styles so as to not appear broken or unstyled in those themes. - figcaption { + :where(figcaption) { @include caption-style(); } } diff --git a/packages/block-library/src/video/theme.scss b/packages/block-library/src/video/theme.scss index cdc95af0b02c2..99af5d557bfa5 100644 --- a/packages/block-library/src/video/theme.scss +++ b/packages/block-library/src/video/theme.scss @@ -1,4 +1,4 @@ -.wp-block-video figcaption { +.wp-block-video :where(figcaption) { @include caption-style-theme(); }