Skip to content

Commit cce9156

Browse files
committed
[css-highlight-api-1] Add note recommending authors to use custom highlight names that are CSS identifiers for easier styling via CSS.
1 parent 56d0548 commit cce9156

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

css-highlight-api-1/Overview.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ Registering Custom Highlights</h3>
229229
The <dfn>custom highlight name</dfn> assigned to a [=custom highlight=] when it is [=registered=]
230230
is used to identify the highlight during styling (see [[#styling-highlights]]).
231231

232+
Note: When registering a [=custom highlight=], authors are recommended to use a
233+
[=custom highlight name=] that is a valid CSS [=identifier=]. Using a name that is not a valid
234+
identifier can make the highlight hard, and in some cases impossible, to style via CSS.
235+
232236
<h2 id=styling-highlights>
233237
Styling Custom Highlights</h2>
234238

0 commit comments

Comments
 (0)