- From: Yves Lafon <ylafon@w3.org>
- Date: Wed, 4 May 2016 10:46:15 +0200
- To: www-style list <www-style@w3.org>
In https://drafts.csswg.org/css-values/#attr-notation the <type-or-unit> definition has this for percentage: [ ‘%’, A keyword matching one of the <length>, <angle>, <time>, or <frequency> units ] In https://drafts.csswg.org/css-values/#calc-type-checking [ If percentages are accepted in the context in which the expression is placed, a <percentage-token> has the type of the value that percentages are relative to; otherwise, a math expression containing percentages is invalid. ] does it imply that it can be used only in those cases ? (like width: attr(foo %) of width: calc(10% / 3) ) ie: is color: rgb(attr(foo %), calc(attr(bar %) + 10% ), 45); allowed ? There is an example in the spec using hsl, but no assertion on its validity. Some clarification in the spec would be useful. (Note that if in the color case % resolves to number, then the attr() definition is wrong unless attr() is forbidden here. Thanks, -- Baroula que barouleras, au tiéu toujou t'entourneras. ~~Yves
Received on Wednesday, 4 May 2016 08:46:21 UTC