Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 27, 2019
1 parent 54c1d7c commit e93a5cd
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 49 deletions.
2 changes: 1 addition & 1 deletion packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@

@mixin block-style__hover {
background: $light-gray-200;
color: $dark-gray-900;
color: $dark-gray-900 !important;
}

@mixin block-style__focus() {
Expand Down
1 change: 0 additions & 1 deletion packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ $z-layers: (
".block-editor-inner-blocks.has-overlay::after": 60,

// The toolbar, when contextual, should be above any adjacent nested block click overlays.
".block-editor-block-list__layout .reusable-block-edit-panel": 61,
".block-editor-block-contextual-toolbar": 61,

// The block mover, particularly in nested contexts,
Expand Down
5 changes: 3 additions & 2 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}

// Navigate mode & Focused wrapper.
&:focus > .block-editor-block-list__block-edit > [data-block] {
&:focus:not(.is-reusable) > .block-editor-block-list__block-edit > [data-block] {
@include button-style__focus-active;
}

Expand Down Expand Up @@ -384,7 +384,7 @@
height: $block-padding + 8px;

// Show a clickable plus.
.block-editor-inserter__toggle {
.block-editor-inserter__toggle.has-icon {
border-radius: 50%;
color: $blue-medium-focus;
background: $white;
Expand Down Expand Up @@ -580,6 +580,7 @@
.components-popover__content {
margin-left: 0 !important;
min-width: auto;
width: max-content;
background: none;
border: none;
box-shadow: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,12 @@ $tree-item-height: 36px;
padding: 6px;
text-align: left;
color: $dark-gray-600;
border-radius: 4px;
border-radius: 2px;

.block-editor-block-icon {
margin-right: 6px;
}

&:hover:not(:disabled):not([aria-disabled="true"]) {
@include menu-style__hover;
}

&:focus:not(:disabled):not([aria-disabled="true"]) {
@include menu-style__focus;
}

&.is-selected,
&.is-selected:focus {
color: $dark-gray-700;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,8 @@
}

&:not(:disabled) {

// Show the hover background in a pseudo selector so it can be below "stacked" icons, like Columns.
&:hover::before {
content: "";
display: block;
@include block-style__hover();
position: absolute;
z-index: -1;
border-radius: $radius-round-rectangle;
top: 0;
right: 0;
bottom: 0;
left: 0;
}

&:hover {
.block-editor-block-types-list__item-icon,
.block-editor-block-types-list__item-title {
color: inherit;
}
}

&:active,
&:focus {
position: relative;
@include block-style__focus();
background: transparent;

.block-editor-block-types-list__item-icon,
.block-editor-block-types-list__item-title {
color: inherit;
}
@include block-style__hover();
}

&.is-active {
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ $block-inserter-search-height: 38px;
.block-editor-inserter__toggle {
display: inline-flex;
align-items: center;
color: $dark-gray-500;
background: none;
cursor: pointer;
border: none;
Expand Down
3 changes: 0 additions & 3 deletions packages/block-library/src/block/edit-panel/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
margin: 0 (-$block-padding);
padding: $grid-size $block-padding;

// Elevate the reusable blocks toolbar above the clickthrough overlay.
z-index: z-index(".block-editor-block-list__layout .reusable-block-edit-panel");

// Use opacity to work in various editor styles.
border: $border-width dashed $border-color;
border-bottom: none;
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-title/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

@include break-mobile() {
position: absolute;
top: -$block-toolbar-height + $border-width + $border-width + 1px; // Shift this element upward the same height as the block toolbar, minus the border size
top: -$icon-button-size + $border-width + $border-width + 1px; // Shift this element upward the same height as the block toolbar, minus the border size
right: 0;
flex-wrap: nowrap;
width: auto;
Expand Down

0 comments on commit e93a5cd

Please sign in to comment.