Closed
Bug 1291240
Opened 9 years ago
Closed 7 years ago
Filter functions should allow calc()
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: sebo, Unassigned)
References
(Blocks 1 open bug, )
Details
According to the spec. CSS filter functions like e.g. contrast() allow <percentage> and <number> or <length> values. As percentages refer to the numbers or lengths, they are equivalent to each other. So, the use of calc() within those functions should be allowed.
Sebastian
Updated•8 years ago
|
Blocks: calc-issues
Updated•8 years ago
|
Priority: -- → P3
Comment 1•8 years ago
|
||
This seems to have been fixed by stylo.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 2•8 years ago
|
||
This bug is not fixed, unfortunately. calc() itself is obviously allowed within the filter functions, though values like contrast(50% + 0.1) are still not interpreted as valid.
Tested in Nightly 59.0a1 (2017-12-20).
Sebastian
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 3•7 years ago
|
||
Adding percentages and units is an invalid expression. So I think this is FIXED. Improvements to calc() in general should be tracked somewhere else.
Status: REOPENED → RESOLVED
Closed: 8 years ago → 7 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 4•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #3)
> Adding percentages and units is an invalid expression.
My fault. I meant contrast(calc(50% + 0.1)) (as outlined in the example URL).
But I reread the CSS Values and Units spec. now and it made me unsure whether numbers can be combined with percentages in calc(). At the definition of the percentage values[1] it says yes but a note in the definition for calc()[2] indicates no.
I may raise an issue for that at the CSSWG.
> Improvements to calc() in general should be tracked somewhere else.
In any case, that's obviously tracked in bug 1264520 already.
Sebastian
[1] https://drafts.csswg.org/css-values-3/#percentages
[2] https://drafts.csswg.org/css-values-3/#calc-type-checking
You need to log in
before you can comment on or make changes to this bug.
Description
•