#45916 closed enhancement (fixed)
Twenty Nineteen: Consider setting background color and foreground color together
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.3 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | good-first-issue good-first-bug has-patch needs-testing |
| Focuses: | css | Cc: |
Description
Originally reported by โ@joyously in the Twenty Nineteen GitHub repo:
On the <body> tag, as a best practice the background-color and text color should always be set together in the main stylesheet. This will make it easier to quickly understand the underlying color scheme.
See here: https://core.trac.wordpress.org/browser/trunk/src/wp-content/themes/twentynineteen/style.css#L765
Original ticket here: โhttps://github.com/WordPress/twentynineteen/issues/64
Attachments (2)
Change History (26)
#2
@
3 years ago
- Milestone changed from Awaiting Review to 6.3
The patch still applies. We could also consider moving the background-color to _typography.scss so the two body colors are defined earlier in the stylesheet and before the text color of form elements (button, input, select, optgroup, textarea).
#3
@
2 years ago
- Keywords changes-requested added
Hi @samful,
can you please make a bit of an improvement, which is mentioned in #comment:2? If you do not have the opportunity, please write if for another developer can make it further.
Thank you ๐
#4
@
2 years ago
- Keywords changes-requested removed
Hello @oglekler , I have applied the #comment:2 suggestion in below patch, let me know your thoughts.
Thanks
#6
@
2 years ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/45916/45916.2.diff
Environment
- OS: macOS 13.4
- Web Server: Nginx
- PHP: 8.1.13
- WordPress: 6.3-alpha-55505-src
- Browser: Google Chrome 114.0.5735.133
- Theme: Twenty Nineteen
- Active Plugins:
none
Actual Results
- โ Issue resolved with patch.
Additional Notes
- Tested the patch. Result as described in #comment:2
- Declaration of color and background property together with same styling result
- Working on subpages / homepage / single posts as expected
#7
@
2 years ago
Description
Twenty-Nineteen: Consider setting the background color and foreground color together
Environment
- WordPress: 6.2.2
- PHP: 8.0.0
- Server: Apache/2.4.10 (Debian)
- Database: mysqli (Server: 5.5.59-MariaDB-1~wheezy / Client: 5.5.62)
- Browser: Chrome 114.0.0.0 (macOS)
- Theme: Twenty-Nineteen
- Plugins:
- WordPress Beta Tester 3.4.1
Steps to Reproduce
- Assurance with @ronakganatra Patch https://core.trac.wordpress.org/attachment/ticket/45916/45916.2.diff
Expected Results
- โ Issue resolved with a patch.
Actual Results
- Tested the patch. Result as described in #comment:2
- Declaration of color and background property together with the same styling result
- Working on subpages/homepage / single posts as expected
This ticket was mentioned in โSlack in #core-test by mai21. โView the logs.
2 years ago
#10
@
2 years ago
- Keywords commit added; needs-testing removed
We have two test reports verifying the patch with no regressions found.
Adding for commit consideration.
#11
@
2 years ago
- Owner set to audrasjb
- Status changed from new to accepted
Self assigning for commit.
#13
@
2 years ago
- Keywords commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening as it looks like this changeset broke the Test Default Themes & Create ZIPs workflow.
#15
@
2 years ago
- Keywords changes-requested needs-patch added; has-patch removed
I reverted [55960], pending a new patch (and I strongly recommend using a PR next time, to make sure the Test Default Themes & Create ZIPs workflow is passing.
#16
@
2 years ago
Should the *.css files be left untouched when adding changes? Will they be built during zip-creation process?
This ticket was mentioned in โPR #4705 on โWordPress/wordpress-develop by โ@audrasjb.
2 years ago
#17
- Keywords has-patch added; needs-patch removed
This ticket was mentioned in โSlack in #core by audrasjb. โView the logs.
2 years ago
This ticket was mentioned in โPR #4714 on โWordPress/wordpress-develop by โ@sabernhardt.
2 years ago
#19
The background color is set earlier, making the second body selector unnecessary.
Trac ticket: https://core.trac.wordpress.org/ticket/45916
#20
@
2 years ago
- Keywords needs-testing added; changes-requested removed
The SCSS from [55960] set both color and background color for the body element in two places, but the compiled CSS files did not match that. I made another PR that groups the color settings with other CSS properties, and a new test report would help.
This ticket was mentioned in โSlack in #core by mukeshpanchal27. โView the logs.
2 years ago
โ@audrasjb commented on โPR #4714:
2 years ago
#24
committed in https://core.trac.wordpress.org/changeset/56062 ๐ค
This ticket is from 2018 on github, I submitted a patch to push this along and changed keywords. If this patch is accepted, then the 2017 theme also has the same issues and needs to be patched in the same way. (The 2020 theme does set these together btw)