-
Benachrichtigungen
You must be signed in to change notification settings - Fork 22.4k
/
index.md
69 lines (47 loc) · 1.36 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: "::spelling-error"
slug: Web/CSS/::spelling-error
page-type: css-pseudo-element
browser-compat: css.selectors.spelling-error
---
{{CSSRef}}
The **`::spelling-error`** [CSS](/en-US/docs/Web/CSS) [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) represents a text segment which the {{glossary("user agent")}} has flagged as incorrectly spelled.
## Allowable properties
Only a small subset of CSS properties can be used in a rule with `::spelling-error` in its selector:
- {{cssxref("color")}}
- {{cssxref("background-color")}}
- {{cssxref("cursor")}}
- {{cssxref("caret-color")}}
- {{cssxref("outline")}} and its longhands
- {{cssxref("text-decoration")}} and its associated properties
- {{cssxref("text-emphasis-color")}}
- {{cssxref("text-shadow")}}
## Syntax
```css
::spelling-error {
/* ... */
}
```
## Examples
### Simple document spell check
In this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
#### HTML
```html
<p contenteditable spellcheck="true">
My friends are coegdfgfddffbgning to the party tonight.
</p>
```
#### CSS
```css
::spelling-error {
text-decoration: wavy red underline;
}
```
#### Result
{{EmbedLiveSample('Simple_document_spell_check', '100%', 60)}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{cssxref("::grammar-error")}}