Skip to content

Remove cover image ‘strong’ style#11036

Merged
gziolo merged 1 commit intomasterfrom
fix/cover-image-bold
Oct 25, 2018
Merged

Remove cover image ‘strong’ style#11036
gziolo merged 1 commit intomasterfrom
fix/cover-image-bold

Conversation

@johngodley
Copy link
Copy Markdown
Contributor

@johngodley johngodley commented Oct 25, 2018

The bold style on a cover image has no effect on the preview. Here the first word is made bold and has the same weight (300) as the second word:

edit_post_ wordpress_latest _wordpress

The reason for this is that the cover block overrides the standard strong weight and specifically sets it to 300. There may have been a reason for this in the past but it's one of the few places in Gutenberg where strong is changed, and removing it fixes the problem. As the CSS is only scoped to the cover block within the rich text editor I don't think it will affect anything else.

edit_post_ wordpress_latest _wordpress

Fixes #8202

How has this been tested?

  1. Add a cover image and try to make the cover text bold
  2. Note that bold text should look visually different, and using a browser inspector it has a weight of 600

Types of changes

Removes CSS override for .wp-block-cover .editor-rich-text strong

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

It overrides the default so the bold doesn’t appear
@johngodley johngodley added the [Block] Cover Affects the Cover Block - used to display content laid over a background image label Oct 25, 2018
@johngodley johngodley requested a review from a team October 25, 2018 05:49
@johngodley johngodley added the [Type] Bug An existing feature does not function as intended label Oct 25, 2018
@gziolo gziolo added this to the 4.2 milestone Oct 25, 2018
@gziolo gziolo requested a review from jasmussen October 25, 2018 06:02
Copy link
Copy Markdown
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Ship it!

@gziolo gziolo merged commit 9097373 into master Oct 25, 2018
@gziolo gziolo deleted the fix/cover-image-bold branch October 25, 2018 09:25
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
It overrides the default so the bold doesn’t appear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to make cover image text appear bold in the editor.

3 participants