::grammar-error

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

::grammar-error CSS 의사 요소사용자 에이전트 가 문법적으로 옳지 않다고 표시한 텍스트 부분을 나타냅니다.

허용되는 속성

::grammar-error 와 그 선택자 규칙은 다음을 포함한 한정적인 수의 CSS 속성만 사용할 수 있습니다..

구문

css
::grammar-error {
  /* ... */
}

얘재

간단하게 문서의 문법 확인하기

이 예제에서, 지원되는 브라우저는 문법적으로 오류가 있는 부분을 표시되는 스타일로 강조해야 합니다.

HTML

html
<p contenteditable spellcheck="true">
  My friends is coming to the party tonight.
</p>

CSS

css
::grammar-error {
  text-decoration: underline red;
  color: red;
}

결과

명세서

Specification
CSS Pseudo-Elements Module Level 4
# selectordef-grammar-error

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
::grammar-error

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

같이 보기