Skip to content

Commit 8bd5380

Browse files
authored
fix (text & heading blocks): Apply text gradient color to spelling errors (#3314)
* use ::spelling-error * move styles to editor-block.scss
1 parent 1b3c1d0 commit 8bd5380

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/styles/editor-block.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,22 @@
290290
margin-top: 0;
291291
}
292292

293+
// Typography
294+
// ::spelling-error is not supported by Firefox so we need to separate it to prevent the style rule above from being invalid
295+
// and because :is() does not allow pseudo-elements inside it.
296+
.stk--is-gradient::spelling-error,
297+
.stk--is-gradient li::spelling-error,
298+
.stk--is-gradient span::spelling-error,
299+
.stk--is-gradient a::spelling-error {
300+
background-clip: text;
301+
-webkit-background-clip: text;
302+
-moz-background-clip: text;
303+
-o-background-clip: text;
304+
-webkit-text-fill-color: transparent;
305+
-moz-text-fill-color: transparent;
306+
-o-text-fill-color: transparent;
307+
}
308+
293309
// Deprecated styles.
294310
@import "deprecated-editor-block";
295311

0 commit comments

Comments
 (0)