File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3154,9 +3154,13 @@ Adding New Color Classes</h4>
31543154 and a <code> toTheOtherColor()</code> method on <code> MyNewColor.prototype</code> .
31553155
31563156 <li>
3157- Custom stringifiers on the <code> stringifiers</a> object,
3158- if it's more accurate/efficient to convert your color class into one of the stringifier types directly
3157+ Custom stringifiers on the <code> stringifiers</a> object for one of the UA-defined color classes ,
3158+ if it's more accurate/efficient to convert your color class into one of the UA-defined types directly
31593159 than it is to first convert it into an <a idl>RGBColor</a> .
3160+
3161+ Note: It is <strong> not</strong> generally useful to define a special stringifier for your class itself;
3162+ the main purpose of the stringifier is to allow the object to be used in a CSS property,
3163+ and only the UA-defined color classes correspond to valid CSS syntaxes.
31603164 </ul>
31613165
31623166 All of these apply to our example HSV color class,
Original file line number Diff line number Diff line change @@ -3262,9 +3262,13 @@ <h4 class="heading settled heading" data-level=15.5.2 id=api-adding-classes><spa
32623262 and a < code > toTheOtherColor()</ code > method on < code > MyNewColor.prototype</ code > .
32633263
32643264 < li >
3265- Custom stringifiers on the < code > stringifiers object,
3266- if it’s more accurate/efficient to convert your color class into one of the stringifier types directly
3265+ Custom stringifiers on the < code > stringifiers object for one of the UA-defined color classes ,
3266+ if it’s more accurate/efficient to convert your color class into one of the UA-defined types directly
32673267 than it is to first convert it into an < a data-link-type =idl href =#dom-rgbcolor title =rgbcolor > RGBColor</ a > .
3268+
3269+ < p class =note > Note: It is < strong > not</ strong > generally useful to define a special stringifier for your class itself;
3270+ the main purpose of the stringifier is to allow the object to be used in a CSS property,
3271+ and only the UA-defined color classes correspond to valid CSS syntaxes.</ p >
32683272 </ code > </ ul > < code >
32693273
32703274< p > All of these apply to our example HSV color class,
You can’t perform that action at this time.
0 commit comments