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

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

Closed
kjellr opened this issue Apr 13, 2020 · 7 comments · Fixed by #21572
Closed

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

kjellr opened this issue Apr 13, 2020 · 7 comments · Fixed by #21572
Assignees
Labels
[Block] Buttons Affects the Buttons Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@kjellr
Copy link
Contributor

kjellr commented Apr 13, 2020

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

@kjellr kjellr added the [Type] Bug An existing feature does not function as intended label Apr 13, 2020
@kjellr
Copy link
Contributor Author

kjellr commented Apr 13, 2020

cc @youknowriad could this be related to #21266?

@paaljoachim
Copy link
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.

@skorasaurus
Copy link
Member

skorasaurus commented Apr 13, 2020

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)

@carolinan
Copy link
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,

@mapk mapk added the [Block] Buttons Affects the Buttons Block label Apr 13, 2020
@mapk
Copy link
Contributor

mapk commented Apr 13, 2020

I can also confirm this bug using:

Gutenberg 7.8
Twenty Nineteen theme

@jffng
Copy link
Contributor

jffng commented Apr 13, 2020

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);
}

@youknowriad
Copy link
Contributor

Missed that variable, it should just be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
7 participants