[format/highlights] Block-level color specificity issues when a text block has a block-level color set #36532
Labels
[Package] Format library
/packages/format-library
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
This issue is threefold:
Highlight
tool that required a transparent background color to be applied to allmarks
by default if no background is set, to prevent themark
s default yellow background. This effectively means that - as far as theHighilight
tool/format algorithm are concerned - that themark
always has a background color (even if transparent), which means that if you clear the color, themark
tag is not removed from the DOM, until you also remove the background color, that is (even if it wasn't explicitly set!);mark
tag has a defaultcolor
CSS rule that is more specific than the rules applied at its parent (in this case theparagraph
andheading
blocks). This means that this will apply until themark
is removed (which means clearing the color and background color).mark
's text color instead.Step-by-step reproduction instructions
Clearing the highlight text color is not enough to recover the block-level color:
Highlight
tool apply a text color (not a background color).Highlight
tool, clear the text color.Highlight
tool, too, even though you did not set any.Applying a background color using the
Highlight
tool overrides the block-level text color, tooHighlight
tool apply a background color only.Highlight
tool.Screenshots, screen recording, code snippet
Peek.2021-11-16.11-31.mp4
Peek.2021-11-16.12-06.mp4
Environment info
Wodpress 5.8.1, Gutenberg 11.9.0
Firefox 95.0b7 (64-bit)
Ubuntu Linux 18.04
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: