Skip to content

Commit

Permalink
MAke navigation block wavy underline more visible on dark backgrounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Feb 3, 2025
1 parent 36690dc commit 3de7762
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,30 +82,9 @@
// Draw a wavy underline.
.wp-block-navigation-link__placeholder-text {
span {
$blur: 10%;
$width: 6%;
$stop1: 30%;
$stop2: 64%;

--wp-underline-color: var(--wp-admin-theme-color);

background-image:
linear-gradient(45deg, transparent ($stop1 - $blur), var(--wp-underline-color) $stop1, var(--wp-underline-color) ($stop1 + $width), transparent ($stop1 + $width + $blur)),
linear-gradient(135deg, transparent ($stop2 - $blur), var(--wp-underline-color) $stop2, var(--wp-underline-color) ($stop2 + $width), transparent ($stop2 + $width + $blur));
background-position: 0 100%;
background-size: 6px 3px;
background-repeat: repeat-x;

// Since applied to a span, it doesn't change the footprint of the item,
// but it does vertically shift the underline to better align.
padding-bottom: 0.1em;
}

&.is-invalid,
&.is-draft {
span {
--wp-underline-color: #{$alert-red};
}
text-decoration: wavy underline;
text-decoration-skip-ink: none;
text-underline-offset: 0.25rem;
}
}

Expand Down

0 comments on commit 3de7762

Please sign in to comment.