Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kjellr opened this issue Jul 25, 2018 · 4 comments · Fixed by #11036
Closed

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

kjellr opened this issue Jul 25, 2018 · 4 comments · Fixed by #11036
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@kjellr
Copy link
Contributor

kjellr commented Jul 25, 2018

Describe the bug

It's currently impossible make cover image text appear bold inside of the editor. If you select the bold toggle, there's a CSS rule that overrides it:

.editor-rich-text strong {

To Reproduce

  1. Insert a cover image block.
  2. Write some text inside of it.
  3. Use the inline option to make the text bold.

Expected behavior

I expected the text to appear bold, but it was not. The text does appear bold on the front end.

Screenshots

cover-image-bold

Additional context
Gutenberg v3.3.0

@kjellr kjellr added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Jul 25, 2018
@kjellr kjellr mentioned this issue Jul 25, 2018
7 tasks
@designsimply
Copy link
Member

Duplicate of #4405 (but it's possible I closed that one prematurely! so please have a look at the related discussion). 🙂

@kjellr
Copy link
Contributor Author

kjellr commented Jul 25, 2018

@designsimply They're really similar bugs, but that one is a little out of date. In that bug:

  • The text in the header image block is bold by default. But when you select the "bold" option, it changes to a lighter weight.

But for this bug:

  • The text in the header image block is not bold by default (that must've changed at some point since that last bug was reported). When you select the "bold" option, nothing happens.

@designsimply
Copy link
Member

When you select the "bold" option, nothing happens

When you highlight the text and select bold, <strong> tags are added. You're right that it appears nothing happens visually though! My interpretation of this comment is that cover image block text is styled as bold by default and that's why it doesn't appear to change but themes may want to surface the bold behavior and so the bold button adds html for that.

@kjellr
Copy link
Contributor Author

kjellr commented Jul 25, 2018

When you highlight the text and select bold, <strong> tags are added. You're right that it appears nothing happens visually though! My interpretation of this comment is that cover image block text is styled as bold by default and that's why it doesn't appear to change but themes may want to surface the bold behavior and so the bold button adds html for that.

Yep, that's all right, except that the Cover Image text is no longer bold by default — its weight is set to 300. Since <strong> tags are added, the fact that nothing happens visually is really the core of this issue. 🙂

(All that said, I think this issue will be resolved if we convert the Cover image block to nested blocks, as described in #5452.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants