Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Canard: Fix editor block styles#4797

Merged
scruffian merged 2 commits into
trunkfrom
fix/4761-canard-block-editor-styles
Oct 13, 2021
Merged

Canard: Fix editor block styles#4797
scruffian merged 2 commits into
trunkfrom
fix/4761-canard-block-editor-styles

Conversation

@danieldudzic
Copy link
Copy Markdown
Contributor

Closes #4761

@danieldudzic danieldudzic requested a review from a team October 6, 2021 18:15
Comment thread canard/functions.php
*/
function canard_editor_styles() {
wp_enqueue_style( 'canard-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
wp_enqueue_style( 'canard-block-style', get_template_directory_uri() . '/blocks.css' );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its probably better to enqueue this before the editor styles so that if they ever target the same selectors the editor styles win.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for 👀 - changed!

@scruffian
Copy link
Copy Markdown
Member

This works for me on the editor, but not on the front end.

@danieldudzic
Copy link
Copy Markdown
Contributor Author

@scruffian Would you mind sharing a bit more info on how you are testing?

It seems to be working fine for me:

About_–_themes_and_Edit_Page_‹_themes_—_WordPress

@scruffian
Copy link
Copy Markdown
Member

I've tried testing locally and on wordpress.com:
Screenshot 2021-10-09 at 09 00 48

@scruffian
Copy link
Copy Markdown
Member

I think this needs a Gutenberg fix: WordPress/gutenberg#35514

@scruffian
Copy link
Copy Markdown
Member

In my testing, this is no longer needed when running GB trunk

@danieldudzic
Copy link
Copy Markdown
Contributor Author

I can't verify that it works correctly, as I can't get Canard to display the Text Color setting:
68747470733a2f2f642e70722f692f51337276456e2b

@scruffian
Copy link
Copy Markdown
Member

I believe that the setting has moved underneath Highlight - there's a text color option there...

@danieldudzic
Copy link
Copy Markdown
Contributor Author

I believe that the setting has moved underneath Highlight - there's a text color option there...

I was wondering that. Thank you for clarifying.

So just to double-check, you're saying that with the latest Gutenberg trunk the Highlight Text color works correctly both in the editor and the page?

@scruffian
Copy link
Copy Markdown
Member

Yeah, it does for me.

@scruffian
Copy link
Copy Markdown
Member

@danieldudzic does it work for you?

@danieldudzic
Copy link
Copy Markdown
Contributor Author

I am running the latest version of Gutenberg trunk (re-compiled) and the latest version of Canard locally and I get:

About_–_themes_and_Edit_Page_‹_themes_—_WordPress

@scruffian
Copy link
Copy Markdown
Member

Sorry, you're right in the editor, this PR is needed as well.

@scruffian scruffian merged commit 244d678 into trunk Oct 13, 2021
@scruffian scruffian deleted the fix/4761-canard-block-editor-styles branch October 13, 2021 11:55
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.

Canard: Add block CSS to the editor so that colors work as expected

2 participants