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

Cover Image Styled Incorrectly #12179

Closed
desrosj opened this issue Nov 21, 2018 · 0 comments
Closed

Cover Image Styled Incorrectly #12179

desrosj opened this issue Nov 21, 2018 · 0 comments
Assignees
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Package] Block library /packages/block-library [Package] Components /packages/components
Milestone

Comments

@desrosj
Copy link
Contributor

desrosj commented Nov 21, 2018

Describe the bug
When the components stylesheet is output before the block library stylesheet, the cover image block is black (making the text unreadable) and too tall.

sgxish1zmi

In the plugin, the block library stylesheet has always been printed out before the components one, so this issue has not come up. But in WordPress Core, the stylesheets are being loaded in a different order.

The order can be enforced in Core using dependencies, but that is not really the correct solution.

For more context, see Core Trac 45279

To Reproduce
Using any of the WordPress 5.0 betas, insert a cover image. You can also add wp-components as a dependency of wp-block-library to force the stylesheets to reorder in the plugin.

Expected behavior
The block should be styled like so:
screen shot 2018-11-21 at 10 04 13 am

@desrosj desrosj added [Package] Components /packages/components [Package] Block library /packages/block-library [Block] Cover Affects the Cover Block - used to display content laid over a background image labels Nov 21, 2018
@desrosj desrosj self-assigned this Nov 21, 2018
jorgefilipecosta pushed a commit that referenced this issue Nov 21, 2018
Prevent the `components` package styles from overriding the cover block background color.

Fixes #12179.
Related: [Trac-45279](https://core.trac.wordpress.org/ticket/45279).

For details on how to reproduce the issue, see #12179.

## Checklist:
- [x] My code is tested.
- [x] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ -->
- ~[ ] My code follows the accessibility standards.~ <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->
- ~[ ] My code has proper inline documentation.~ <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->
@youknowriad youknowriad added this to the 4.6 milestone Nov 30, 2018
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 [Package] Block library /packages/block-library [Package] Components /packages/components
Projects
None yet
Development

No branches or pull requests

2 participants