Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Spacing and focus styles.
  • Loading branch information
jasmussen committed Apr 5, 2022
commit 7fe7b93bad60b15d85500697e4eede04b15ffcc9
13 changes: 12 additions & 1 deletion packages/edit-post/src/components/sidebar/post-title/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
font-size: 16px;
line-height: 1.6;
font-weight: 500;
margin: $grid-unit-20 0;
margin: $grid-unit-15 0;

// Focus style
width: 100%;
border-radius: $radius-block-ui - $border-width;

&:focus-within {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);

// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
}
}
12 changes: 12 additions & 0 deletions packages/editor/src/components/post-excerpt/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
width: 100%;
margin-bottom: 10px;
}

.editor-post-excerpt {
// Focus style
border-radius: $radius-block-ui - $border-width;

&:focus-within {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);

// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
}
}
12 changes: 4 additions & 8 deletions packages/editor/src/components/post-featured-image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
margin-left: -$grid-unit-20;
margin-right: -$grid-unit-20;

.components-panel__body-title + & {
margin-top: -5px;
}

// Ensure a consistent dropzone and avoid jumps when loading.
height: 140px;
overflow: hidden;
Expand All @@ -21,8 +25,6 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

// @todo: these rules can be removed if we retire post-featured-image.
margin-top: 0;
margin-left: 0;
}
Expand Down Expand Up @@ -56,12 +58,6 @@
opacity: 0;
transition: all 0.1s ease-out;
@include reduce-motion("transition");

// @todo: these rules can be removed if we retire post-featured-image.
.components-button + .components-button {
display: block;
margin-top: 0;
}
}

&:focus-within .editor-post-featured-image__actions,
Expand Down