[wp-trac] [WordPress Trac] #56638: Twenty Twenty-One: submit button colors inside a block with background color

WordPress Trac noreply at wordpress.org
Wed May 21 11:10:39 UTC 2025


#56638: Twenty Twenty-One: submit button colors inside a block with background
color
-------------------------------------------------+-------------------------
 Reporter:  upadalavipul                         |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Bundled Theme                        |     Version:  6.0.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch changes-requested has-     |     Focuses:  css
  test-info                                      |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  has-patch needs-testing => has-patch changes-requested has-
     test-info


Comment:

 == Test Report
 === Description
 🟠 This report validates that the indicated patch works as expected, with
 some caveats (check Additional Notes)

 Patch tested:
 https://core.trac.wordpress.org/attachment/ticket/56638/56638.1.diff

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 136.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-One 2.5
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Reproduction Steps
 1. Create a new post
 2. Add the "Comments Form" Block
 3. Change the Text Color and Background Color.

 === Actual Results
 1.  🟠 Issue resolved with a patch, but some code improvements could take
 place.

 === Additional Notes

 1. I have refreshed the patch because it was not applying (wrong patch
 format)

 2. Replying to [comment:5 sabernhardt]:
 > However, there might be another situation where a submit button inside a
 block with a background color should not have the current styling.
 There is something that has been concerning me for a while. The use of
 global colour CSS variables in 2021 (this was never used before, from 2020
 and before). Global Color CSS variables was released a year after 2021 was
 released and meant for Block Themes, as you say 2021 was the last classic
 editor, introducing this "feature" (that is a useless feature for a non-
 block theme since global colours are not editable in the interface, and
 they have brought a lot of havoc to 2021, most of the reports I've tested
 so far with this theme are related to the use of this)

 3. **Conclusion**: @upadalavipul, despite this patch works, I would
 suggest modifying to avoid using global colour CSS variables.

 === Supplemental Artifacts

 ==== 🐞 Front End Pre-Patch
 [[Image(https://i.imgur.com/IDTFpfE.png)]]

 ==== ✅ Front End Post-Patch
 [[Image(https://i.imgur.com/HxZAnc3.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56638#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list