Skip to content

Commit 119e4fb

Browse files
sanketjaphillips
andauthored
[css-highlight-api-1] Add i18n warning about placement of range endpoints in text (#8647)
* [css-highlight-api-1] Add i18n warning about placement of range endpoints in text. * Update css-highlight-api-1/Overview.bs Co-authored-by: Addison Phillips <addisonI18N@gmail.com>
1 parent 3e6f4f6 commit 119e4fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

css-highlight-api-1/Overview.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ Creating Custom Highlights</h3>
162162
authors can chose between using {{Range}} objects and {{StaticRange}} objects.
163163
See [[#range-invalidation]] for more details about this choice and its implications.
164164

165+
Note: When creating {{Range}} objects for use in [=custom highlights=], it is
166+
suggested that authors avoid placing [=range=] endpoints in the middle of a [=grapheme=],
167+
such as when a visible unit of text is comprised of multiple [=Unicode code points=].
168+
Doing so can create undesirable highlighting effects, such as highlighting only part of
169+
an Indic syllable. In addition, care needs to be taken to avoid placing an endpoint
170+
in the middle of a [=supplementary character=].
171+
165172
<xmp class="idl">
166173
enum HighlightType {
167174
"highlight",

0 commit comments

Comments
 (0)