[wp-trac] [WordPress Trac] #56290: Twenty Twelve: Button blocks inside widget areas don't apply custom colours
WordPress Trac
noreply at wordpress.org
Thu Sep 1 19:07:18 UTC 2022
#56290: Twenty Twelve: Button blocks inside widget areas don't apply custom colours
-------------------------------------------------+-------------------------
Reporter: mrfoxtalbot | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Bundled Theme | Version: 5.8
Severity: normal | Resolution:
Keywords: needs-testing-info good-first-bug | Focuses: css
has-patch |
-------------------------------------------------+-------------------------
Comment (by sabernhardt):
1. If anyone has specified a text color for `.widget-area .widget a`, then
`.widget-area .widget a:not(.wp-block-button__link)` would override their
link color in any other widget block (and in widgets that do not use the
block editor at all). Removing `.widget` to make the selector `.widget-
area a:not(.wp-block-button__link)` might work, though.
2. The `.entry-content` class was intentionally added in r44194, so we
probably cannot simply remove that. I recommend supporting both with and
without it:
{{{
.has-blue-color,
.has-blue-color:visited,
.entry-content .has-blue-color,
.entry-content .has-blue-color:visited {
color: #21759b;
}
}}}
For testing, I made a post with various Button blocks and a Paragraph
block with regular text links. To import the XML, go to Tools > Import and
choose the WordPress importer. To add these blocks to a Widget area, you
could open the post and select "Copy all content" (or "Copy all blocks")
from the 3-dot Options menu, and then paste them in a Paragraph block in
the Widgets editor. You may need to verify all blocks copied and pasted
properly.
Don't worry about the Button blocks with default text color and dark
backgrounds; hopefully any users who change the background from light to
dark understand that they need to change the text color as well. And the
blocks probably should always have a link destination, but I included the
'no href' possibility.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56290#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list