Skip to content

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

Closed

Description

@kjellr

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

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    on Jul 25, 2018
  2. designsimply commented on Jul 25, 2018

    @designsimply
    Member

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

  3. kjellr commented on Jul 25, 2018

    @kjellr
    ContributorAuthor

    @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.
  4. designsimply commented on Jul 25, 2018

    @designsimply
    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.

  5. kjellr commented on Jul 25, 2018

    @kjellr
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] BlocksOverall functionality of blocks[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions