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

Try: Obscure edit-ability of post content blocks in the template editor #31461

Closed
wants to merge 3 commits into from
Closed
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
58 changes: 58 additions & 0 deletions packages/edit-post/src/components/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,61 @@
color: $gray-100;
}
}


// Begin proof of concept
.is-template-mode {
// Hide editability of all blocks inside the Post Content block
.wp-block-post-content {
> * {
pointer-events: none;
}

&.is-selected,
&.is-hovered {
&::after {
background: rgba(#007cba, 0.2);
z-index: 1;
}
}
}

// Hide inline inserters
.popover-slot {
.block-editor-block-list__insertion-point {
display: none !important;
}
}

// Hide editability of text based post blocks
.wp-block-post-title,
.wp-block-post-author,
.wp-block-post-date,
.wp-block-post-hierarchical-terms,
.wp-block-post-tags,
.wp-block-post-comments,
.wp-block-post-comments-link,
.wp-block-post-excerpt {
cursor: default !important;
caret-color: transparent;

&::selection {
background: transparent;
}

&.is-selected,
&.is-hovered {
&::after {
background: rgba(#007cba, 0.2);
z-index: 1;
}
}
}

// Disable featured image uploading
.wp-block-post-featured-image {
.components-placeholder__fieldset {
display: none;
}
}
}