Skip to content

Default button styles are broken when there are no editor styles provided #21561

Closed

Description

@kjellr

Describe the bug

When a theme does not provide editor styles, buttons are currently appearing broken in the editor.

To reproduce

  1. Use a theme that provides no editor styles (like the Gutenberg Starter theme)
  2. Activate Gutenberg 7.9 RC1 (or master currently)
  3. Add a button block.
  4. View error.

Screenshots

Current, broken example:
Screen Shot 2020-04-13 at 12 29 58 PM

Same block, but with the plugin deactivated:
Screen Shot 2020-04-13 at 12 53 55 PM

Version

Gutenberg 7.9 RC1

Activity

  1. added
    [Type] Bug
    on Apr 13, 2020
  2. kjellr commented on Apr 13, 2020

    @kjellr
    ContributorAuthor

    cc @youknowriad could this be related to #21266?

  3. paaljoachim commented on Apr 13, 2020

    @paaljoachim
    Contributor

    Testing using the Gutenberg Starter theme: https://github.com/WordPress/gutenberg-starter-theme

    Local site using Desktop Server.
    Chrome
    WordPress 5.4
    First I tested with using Gutenberg version 7.8.1.
    Button block showed up.


    Testing Gutenberg version 7.9.0-rc.1.
    I am getting the same result as Kjell did further above.

    Result:

    Selected button:
    Screen Shot 2020-04-13 at 19 23 03

    Selected button block:
    Screen Shot 2020-04-13 at 19 24 06

    Non selected button block:
    Does not show button.

  4. skorasaurus commented on Apr 13, 2020

    @skorasaurus
    Member

    can confirm using a build from c3798f1

    (also can confirm @carolinan 's issue as well; but I've been experiencing it after rebuilding Gutenberg from master last week; I just thought it was my slower computer ;p)

  5. carolinan commented on Apr 13, 2020

    @carolinan
    Contributor

    I am also experiencing a delay when typing the button text, both with and without editor styles, that does not happen with 7.8.

    Win 10, WordPress 5.4, 7.9.0 RC 1, Chrome Version 81.0.4044.92,

  6. added
    [Block] Buttons
    on Apr 13, 2020
  7. mapk commented on Apr 13, 2020

    @mapk
    Contributor

    I can also confirm this bug using:

    Gutenberg 7.8
    Twenty Nineteen theme

  8. jffng commented on Apr 13, 2020

    @jffng
    Contributor

    Looks like if --wp--color-text is not set, the button text fallbacks to white:

    &:hover,
    &:focus,
    &:active,
    &:visited {
    color: var(--wp--color--text, $white);
    }

  9. youknowriad commented on Apr 13, 2020

    @youknowriad
    Contributor

    Missed that variable, it should just be removed.

  10. added
    [Status] In Progress
    on Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] Buttons[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions