Skip to content

Commit

Permalink
Adjust CSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia authored Jan 28, 2025
1 parent d2304ac commit 60880d6
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@
margin-bottom: $grid-unit-20;
margin-left: $grid-unit-20;
}

.wp-block-navigation-link__placeholder-text {
&.is-invalid,
&.is-draft {
--wp-underline-color: var(--wp--preset--color--vivid-red);
}
}
}

.wp-block-navigation-link__invalid-item {
Expand All @@ -88,23 +81,33 @@

// Draw a wavy underline.
.wp-block-navigation-link__placeholder-text {
$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;
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: var(--wp--preset--color--vivid-red);
}
}
}

// This needs extra specificity.
Expand Down

0 comments on commit 60880d6

Please sign in to comment.