From 0a9d01508233082be36ed4c266548640ad886868 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 12 Feb 2024 10:46:21 +0000 Subject: [PATCH] Twenty Twenty: Fix Table block default and custom border colors. On the front end, this changeset restores the theme's default border color when (and only when) the block's text color is the default. In the editor, these styles repurpose the user-selected color for the border, to match the front. Props nidhidhandhukiya, sabernhardt, pooja1210, pouicpouic, poena, shailu25, ugyensupport, wasiur195, rajinsharwar, wasiur195, jivygraphics, huzaifaalmesbah, harshgajipara, nicolefurlan, sumitbagthariya16. Fixes #58022. git-svn-id: https://develop.svn.wordpress.org/trunk@57587 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentytwenty/assets/css/editor-style-block-rtl.css | 4 ++++ .../themes/twentytwenty/assets/css/editor-style-block.css | 4 ++++ src/wp-content/themes/twentytwenty/style-rtl.css | 4 ++++ src/wp-content/themes/twentytwenty/style.css | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css b/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css index b4dfac35c0..3df45493e9 100644 --- a/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css +++ b/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css @@ -510,6 +510,10 @@ border-color: #dcd7ca; } +.editor-styles-wrapper .wp-block-table table:where(.has-text-color) * { + border-color: currentColor; +} + .editor-styles-wrapper .wp-block-table tr { border: none; } diff --git a/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css b/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css index eb498e1490..41efe125bd 100644 --- a/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css +++ b/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css @@ -514,6 +514,10 @@ border-color: #dcd7ca; } +.editor-styles-wrapper .wp-block-table table:where(.has-text-color) * { + border-color: currentColor; +} + .editor-styles-wrapper .wp-block-table tr { border: none; } diff --git a/src/wp-content/themes/twentytwenty/style-rtl.css b/src/wp-content/themes/twentytwenty/style-rtl.css index b7ae83944c..43f5b0bd44 100644 --- a/src/wp-content/themes/twentytwenty/style-rtl.css +++ b/src/wp-content/themes/twentytwenty/style-rtl.css @@ -3356,6 +3356,10 @@ hr.wp-block-separator { /* Block: Table ------------------------------ */ +.wp-block-table table:where(:not(.has-text-color)) * { + border-color: inherit; +} + .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: #dcd7ca; } diff --git a/src/wp-content/themes/twentytwenty/style.css b/src/wp-content/themes/twentytwenty/style.css index 0f87453139..33a643d0ff 100644 --- a/src/wp-content/themes/twentytwenty/style.css +++ b/src/wp-content/themes/twentytwenty/style.css @@ -3376,6 +3376,10 @@ hr.wp-block-separator { /* Block: Table ------------------------------ */ +.wp-block-table table:where(:not(.has-text-color)) * { + border-color: inherit; +} + .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: #dcd7ca; }