Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

👌 IMPROVE: Styles from wp-editor with context #267

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

Connum
Copy link
Contributor

@Connum Connum commented Feb 12, 2020

Only add wp-editor as block CSS dependency when in admin context, in order to avoid WordPress enqueuing additional backend CSS in the frontend leading to unnecessary requests.

This addresses issue #210.

…avoid WordPress enqueuing additional backend css in the frontend leading to unnecessary requests
@ahmadawais
Copy link
Owner

@asharirfan @saqibameen test this one and approve the PR so I can release a new version.

@ahmadawais ahmadawais changed the title only add wp-editor as block CSS dependency when in admin context 👌 IMPROVE: Styles from wp-editor with context Feb 14, 2020
@ahmadawais ahmadawais merged commit ed59e80 into ahmadawais:master Feb 14, 2020
@ahmadawais
Copy link
Owner

Thank you! @Connum

Successfully published:

  • cgb-scripts@1.23.0
  • create-guten-block@1.14.0

@piotr-bajer
Copy link

piotr-bajer commented Feb 17, 2020

Hi, would it be better to change the dependency to like array( 'wp-block-library' ) here:
f24100b#diff-4317d120593768bbdedb26f6949dadadR35
?

This way the additional scripts are not loaded and we have a chance to overwrite the default styles for core blocks since the styles are loaded after core styles?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants