This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Minimize loss of block contrast when changing global style #713
Labels
[Type] Bug
Something isn't working
Description
Global style changes occur independently of palette settings.
In some parts of Twenty Twenty Four / theme.json, --wp--preset--color--contrast-2 (text color) is specified,
This causes several blocks to lose contrast.
Step-by-step reproduction instructions
1 Set the background color of the global style to black and the text color to white.
2 Check the contrast of wp-block-post-date, wp-block-post-terms, wp-block-site-tagline, wp-block-quote in the front end.
3, Delete "color": {"background": "var(--wp--preset--color--base-2)"}, from each block in theme.json.
4 Check the contrast change on the front end.
Expected behavior
the text color of the body element is inherited.
Screenshots
Environment info
Additional context
Try creating a new post in Step 1.
The post title will be the same as the background color, making it difficult to type.
.is-dark-theme .wp-block-post-title{ color:#fff; }
In Step2, check the change in the background of header.html
Because the backgroundColor is specified, it will probably appear with a different background than the theme intended.
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"backgroundColor":"base","color":"contrast","layout":{"type":"constrained"}} -->
The text was updated successfully, but these errors were encountered: