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

Navigation: Force text decoration styles on nav item in editor #35859

Merged
merged 4 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ export default function NavigationLinkEdit( {
'core/image',
'core/strikethrough',
] }
tagName="span"
onClick={ () => {
if ( ! url ) {
setIsLinkOpen( true );
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
}
}

// This element is inline on the frontend but needs to be editable, therefore inline-block, in the editor.
// This element is inline on the frontend but needs to be editable, therefore ensure that the RichText field is inline in the editor.
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's inline on the frontend, and it works as inline in the editor also (I could swear it needed to be inline-block for some reason), then this entire rule can be removed from the editor style, no?

.wp-block-navigation-item__label {
display: inline-block;
display: inline;
}

/**
Expand Down