Skip to content

Commit 7e05e55

Browse files
committed
[css-typed-om] Specify that the list of unit shorthand methods must be reduced/expanded to match the implementation's support.
1 parent 3783bd7 commit 7e05e55

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

css-typed-om/Overview.bs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,39 @@ partial namespace CSS {
23682368
to avoid defining the unit individually for all ~60 functions.
23692369
</div>
23702370

2371+
The above list of methods reflects the set of CSS's valid predefined units
2372+
at one particular point in time.
2373+
It will be updated over time,
2374+
but might be out-of-date at any given moment.
2375+
If an implementation supports additional CSS units
2376+
that do not have a corresponding method in the above list,
2377+
but that do correspond to one of the existing {{CSSNumericType}} values,
2378+
it must additionally support such a method,
2379+
named after the unit
2380+
in its defined canonical casing,
2381+
using the generic behavior defined above.
2382+
2383+
If an implementation supports units
2384+
that do <em>not</em> correspond to one of the existing {{CSSNumericType}} values,
2385+
it must not support those units in the APIs defined in this specification;
2386+
it should request the units and their types
2387+
be added explicitly to this specification,
2388+
as the appropriate type name is not implicit from the unit.
2389+
2390+
If an implementation does not support a given unit,
2391+
it must not implement its corresponding method from the list above.
2392+
2393+
<div class=example>
2394+
For example, the CSS Speech spec [[CSS-SPEECH-1]]
2395+
defines two additional units,
2396+
the decibel <css>dB</css> and semitone <css>st</css>.
2397+
No current browser implementation supports these
2398+
or has plans to,
2399+
so they're not included in the above list,
2400+
but if an implementation <em>does</em> support the Speec spec,
2401+
it must also expose <code>CSS.dB()</code> and <code>CSS.st()</code> methods.
2402+
</div>
2403+
23712404

23722405
<!--
23732406
████████ ████████ ███ ██ ██ ██████ ████████ ███████ ████████ ██ ██

0 commit comments

Comments
 (0)