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

Gutenberg: Apply box-sizing: border-box to the entire section #27928

Merged
merged 1 commit into from
Oct 19, 2018
Merged
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
67 changes: 19 additions & 48 deletions client/gutenberg/editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ $gutenberg-theme-toggle: #11a0d2;
//========================================================

.is-section-gutenberg-editor {
box-sizing: border-box !important;

*,
*::before,
*::after {
box-sizing: inherit !important;
}

.layout__content {
padding-left: 32px;
padding-top: 0;
Expand All @@ -45,40 +53,24 @@ $gutenberg-theme-toggle: #11a0d2;
top: 0;
}


@media (min-width: 600px) {
.edit-post-sidebar {
top: 57px;
top: 56px;
}
}

.editor-inserter__menu {
.editor-inserter__search {
width: auto;
}
.editor-block-types-list__list-item {
box-sizing: border-box;
}
.edit-post-layout .editor-post-publish-panel {
top: 0;
}

.edit-post-sidebar {
.components-panel__body {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
&.editor-block-inspector__advanced {
margin-bottom: -16px;
}
}

.editor-block-inspector__card {
margin-bottom: 0;
}
.editor-inserter__menu .editor-inserter__search {
width: auto;
}

.editor-post-last-revision__title {
width: auto;
.editor-block-list__block {
ul ul, ol ol {
list-style-type: circle;
}
}

Expand Down Expand Up @@ -108,28 +100,7 @@ $gutenberg-theme-toggle: #11a0d2;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000; /* Above WP toolbar. */
}
}

.editor-block-list__block {
ul ul, ol ol {
list-style-type: circle;
z-index: 100000; // Above WP toolbar.
Copy link
Member

Choose a reason for hiding this comment

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

its-over-9000-gif-1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}
}
}

//needed for oembed iframes to appear
.wp-block-embed__wrapper > iframe {
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this, because box-sizing updates don't seem related?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually tested this by following the instructions included in #27486 and I couldn't see any problems with the Oembed block.
@gwwar do you happen to remember if there are corner cases to check here?

Copy link
Member

Choose a reason for hiding this comment

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

I went through the original testing steps too and confirmed that it works as expected even without these styles. 👍Might be the case that package updates made this fix obsolete.

width: 100%;
}

//block icons sizing
.components-toolbar__control.components-button > svg,
.editor-block-settings-menu__content {
box-sizing: border-box;
}

.components-panel__header.edit-post-sidebar-header.edit-post-sidebar__panel-tabs {
border-bottom: 0;
}