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

Adds site editor mobile block settings and styles #53412

Merged
merged 1 commit into from
Aug 8, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
overflow: hidden;

// Offset the layout based on the width of the ⌘K label. This ensures the title is centrally aligned.
padding-left: $grid-unit-40;
@include break-small() {
padding-left: $grid-unit-40;
}

&:hover {
color: var(--wp-block-synced-color);
Expand Down Expand Up @@ -95,6 +97,10 @@
.edit-site-document-actions__shortcut {
color: $gray-800;
min-width: $grid-unit-40;
display: none;
@include break-small() {
display: initial;
}
}

.edit-site-document-actions__back.components-button.has-icon.has-text {
Expand Down
9 changes: 0 additions & 9 deletions packages/edit-site/src/components/header-edit-mode/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ $header-toolbar-min-width: 335px;
@include break-small() {
gap: $grid-unit-10;
}

// Pinned items.
.interface-pinned-items {
display: none;

@include break-medium() {
display: inline-flex;
}
}
}

.edit-site-header-edit-mode__preview-options {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function DefaultSidebar( {
scope="core/edit-site"
identifier={ identifier }
title={ title }
smallScreenTitle={ title }
icon={ icon }
closeLabel={ closeLabel }
header={ header }
Expand Down
22 changes: 12 additions & 10 deletions packages/interface/src/components/pinned-items/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@

// We intentionally hide pinned items (plugins) on mobile, and unhide them at desktop breakpoints.
// Otherwise the list can wreak havoc on the layout.
.components-button:not(:first-child) {
.components-button {
display: none;
margin: 0;

&:nth-last-child(1),
&:nth-last-child(2) {
display: flex;
}

svg {
max-width: $icon-size;
max-height: $icon-size;
}

@include break-small() {
display: flex;
Expand All @@ -16,13 +27,4 @@

// Account for larger grid from parent container gap.
margin-right: -$grid-unit-05;

.components-button {
margin: 0;

svg {
max-width: $icon-size;
max-height: $icon-size;
}
}
}