[css-houdini-drafts] [css-typed-om] do types have hints? (#1092)

gsnedders has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-typed-om] do types have hints? ==
c.f. https://drafts.css-houdini.org/css-typed-om-1/#numeric-typing

> Each [CSSNumericValue](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue) has an associated type, which is a [map](https://infra.spec.whatwg.org/#ordered-map) of [base types](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-base-type) to integers (denoting the exponent of each type, so a [<length>](https://drafts.csswg.org/css-values-4/#length-value)2, such as from calc(1px * 1em), is «[ "length" → 2 ]»), and an associated [percent hint](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-percent-hint) (indicating that the type actually holds a percentage, but that percentage will eventually resolve to the hinted [base type](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-base-type), and so has been replaced with it in the type).

By my reading, this means we have a:

```
struct CSSNumericValue {
  …
  Map[BaseType, Integer] types,
  Optional[BaseType] percent_hint,
}
```

Yet variously below we have things like:

> If both type1 and type2 have non-null [percent hints](https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-percent-hint) with different values

… which implies that the percent hint is part of the type, not associated with the CSSNumericValue. Unless "type1" and "type2" in this setting are the data associated with the CSSNumericValue, and not the "type" defined above?

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1092 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 25 April 2023 14:17:35 UTC