Skip to content

Commit a938a9d

Browse files
committed
Simplify and polish the waviness.
1 parent fa99da1 commit a938a9d

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

packages/block-library/src/navigation-link/editor.scss

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,27 @@
8080
.wp-block-navigation-link__placeholder {
8181
position: relative;
8282

83+
// Appear disabled to indicate incompleteness.
84+
opacity: 0.6;
85+
&:hover,
86+
&:focus,
87+
.is-selected > & {
88+
opacity: 1;
89+
}
90+
91+
// Draw a wavy underline.
8392
.wp-block-navigation-link__placeholder-text {
93+
$blur: 10%;
94+
$width: 6%;
95+
$stop1: 30%;
96+
$stop2: 64%;
97+
8498
background-image:
85-
linear-gradient(135deg, transparent 10%, currentColor 10%, currentColor 30%, transparent 30%),
86-
linear-gradient(45deg, transparent 30%, currentColor 30%, currentColor 50%, transparent 50%),
87-
linear-gradient(135deg, transparent 50%, currentColor 50%, currentColor 70%, transparent 70%),
88-
linear-gradient(45deg, transparent 70%, currentColor 70%, currentColor 90%, transparent 90%);
89-
background-size: 10px 3px;
90-
background-repeat: repeat-x;
99+
linear-gradient(45deg, transparent ($stop1 - $blur), currentColor $stop1, currentColor ($stop1 + $width), transparent ($stop1 + $width + $blur)),
100+
linear-gradient(135deg, transparent ($stop2 - $blur), currentColor $stop2, currentColor ($stop2 + $width), transparent ($stop2 + $width + $blur));
91101
background-position: 0 100%;
102+
background-size: 6px 3px;
103+
background-repeat: repeat-x;
92104
}
93105

94106
// This needs extra specificity.

0 commit comments

Comments
 (0)