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

Updated styling to match the post editor #23525

Merged
merged 2 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all 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/edit-site/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default function Header( {
<Button
isPrimary
isPressed={ isInserterOpen }
className="edit-site-header-toolbar__inserter-toggle"
onClick={ onToggleInserter }
icon={ plus }
label={ _x(
Expand Down
9 changes: 7 additions & 2 deletions packages/edit-site/src/components/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
.edit-site-header__toolbar {
display: flex;
flex-grow: 1;
padding-left: $grid-unit-10;
padding-left: $grid-unit-30;
align-items: center;

& > * {
.edit-site-header-toolbar__inserter-toggle {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why doesn't edit-post-header__toolbar have similar styles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does, but it's too specific and expects to be in a post-editor container. :/

Copy link
Contributor

Choose a reason for hiding this comment

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

I only see it when it has .has-icon.

Copy link
Contributor Author

@MichaelArestad MichaelArestad Jul 7, 2020

Choose a reason for hiding this comment

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

@epiqueras What do you mean? I don't fully understand what you're asking or proposing here.

Copy link
Contributor

Choose a reason for hiding this comment

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

edit-post-header__toolbar only has these styles with .has-icon. Shouldn't it be the same here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the .has-icon selector is unnecessary. This element always has an icon. I can't think of a good reason to add it other than maybe it was an attempt to increase specificity to protect against theme style conflicts. Feel free to add it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep it consistent between both places? I.e., remove it from the post editor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. @epiqueras that should probably be a separate PR, correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure

margin-left: 5px;
margin-right: $grid-unit-10;
min-width: $grid-unit-40;
width: $grid-unit-40;
height: $grid-unit-40;
padding: 0;
}
}

Expand Down