Skip to content

Commit

Permalink
Polish horizontal nav and text footprint experiment.
Browse files Browse the repository at this point in the history
This moves the flashing footprint indicator to only the paragraph block.
  • Loading branch information
jasmussen authored and Joen Asmussen committed Feb 20, 2020
1 parent 3f82e61 commit c218783
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
32 changes: 0 additions & 32 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -177,38 +177,6 @@
}
}

// Show a footprint fade effect when first selecting any block.
.block-editor-block-list__block.is-selected::before {
position: absolute;
z-index: 1;
pointer-events: none;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;

background: rgba($black, 0.04);

// Flash a white color for dark themes.
.is-dark-theme & {
background: rgba($white, 0.15);
}

animation: block-editor-block-list__block-fade-out-animation 0.3s ease-out 0.3s;
animation-fill-mode: forwards;
@include reduce-motion("animation");
}

@keyframes block-editor-block-list__block-fade-out-animation {
from {
opacity: 1;
}
to {
opacity: 0;
}
}

// Hide the focus indicator for collapsed blocks.
// These serve as only as column containers for floated blocks.
.block-editor-block-list__block.is-block-collapsed::after {
Expand Down
2 changes: 2 additions & 0 deletions packages/block-editor/src/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
height: $block-toolbar-height;
width: $block-toolbar-height/2 !important;
min-width: $grid-unit-30;
padding-left: 0;
padding-right: 0;

// Focus style.
&::before {
Expand Down
33 changes: 33 additions & 0 deletions packages/block-library/src/paragraph/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,36 @@
.block-editor-block-list__block[data-type="core/paragraph"] .has-drop-cap:focus {
min-height: auto !important;
}


// Show a footprint fade effect when first selecting any block.
.block-editor-block-list__block[data-type="core/paragraph"].is-selected:not(.is-typing)::before {
position: absolute;
z-index: 1;
pointer-events: none;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;

background: rgba($black, 0.03);

// Flash a white color for dark themes.
.is-dark-theme & {
background: rgba($white, 0.1);
}

animation: block-editor-block-list__block-fade-out-animation 0.3s ease-out 0.2s;
animation-fill-mode: forwards;
@include reduce-motion("animation");
}

@keyframes block-editor-block-list__block-fade-out-animation {
from {
opacity: 1;
}
to {
opacity: 0;
}
}

0 comments on commit c218783

Please sign in to comment.