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

Fix a typo in classic block, and scope Quote editor styles #7040

Merged
merged 4 commits into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core-blocks/freeform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const name = 'core/freeform';
export const settings = {
title: __( 'Classic' ),

description: __( 'It\'s the classic WordPress editor and it\'s block! Drop the editor right in.' ),
description: __( 'It\'s the classic WordPress editor and it\'s a block! Drop the editor right in.' ),

icon: 'editor-kitchensink',

Expand Down
11 changes: 6 additions & 5 deletions core-blocks/quote/editor.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.wp-block-quote {
.editor-block-list__block[data-type="core/image"] .wp-block-quote {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like a bug here "core/image"? Also, be mindful that we should try to avoid these selectors because the .editor-block-list__block[data-type="core/*"]div is not rendered when you save the block as reusable breaking the styles when editing reusable blocks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely a bug. Fixed typo, thanks.

Also, be mindful that we should try to avoid these selectors because the .editor-block-list__block[data-type="core/*"]div is not rendered when you save the block as reusable breaking the styles when editing reusable blocks.

Right — this would be for scoping editor-only styles. Any style that should be shown in both the editor and the front-end should presumably be in style.scss right?

Copy link
Member

Choose a reason for hiding this comment

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

I think Riad is trying to explain that when you save your block as reusable (Saved) block, those rules won't be applied, because it is going to be controlled by data-type="data" matcher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmmmmm. Okay, tricky. I'll remove this for now, but it'd be nice if there was a way to scope styles to be editor only.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we use .gutenberg className to scope those for now.

margin: 0;

cite {
display: block;
}
}

.wp-block-quote:not(.is-large) {
border-left: 4px solid $black;
padding-left: 1em;
&:not(.is-large) {
border-left: 4px solid $black;
padding-left: 1em;
}

}