CSS.supports('break-after', 'avoid') returns true despite no support
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: claas, Unassigned)
References
Details
Background: Firefox doesn't support [page-]break-before/after: avoid (bug 775617).
Expected: CSS.supports('break-after', 'avoid') should return false.
Actual: CSS.supports('break-after', 'avoid') returns true.
The following all return true, although the features aren't implemented :
CSS.supports('break-before', 'avoid');
CSS.supports('break-after', 'avoid');
CSS.supports('page-break-before', 'avoid'); // legacy
CSS.supports('page-break-after', 'avoid'); // legacy
(page-break-inside: avoid and break-inside: avoid are omitted here, as these are implemented, see bug 685012.)
To check, you can also run the MDN BCD Collector tests (which use CSS.supports() to determine support):
Comment 1•11 months ago
|
||
We do support them (as in, parse them), though I think indeed there are rather important bugs in our implementation. E.g. we support them in flexbox afaict (bug 1890238), but not in a lot of other places.
| Reporter | ||
Comment 2•11 months ago
|
||
TIL the spec for CSS.supports() states:
If (…) value successfully parses according to that property’s grammar, return true.
So it seems CSS.supports() is not actually intended for feature detection?
Earlier I came across comment 3 in bug 775618:
We don't actually implement these values, so we shouldn't parse them, either.
So this makes me wonder why we parse avoid?
Note that comment 2 in bug 1890238 states:
In this patch, we don't handle avoid
break values such as break-before:avoid and break-after:avoid since they are
not handled in other frame types yet.
So I don't think avoid is supported in flexbox either.
Comment 3•11 months ago
|
||
It seems we've parsed page-break-after: avoid at least as far back as 2007: https://hg-edge.mozilla.org/mozilla-central/rev/2eaf4545bec3c303a80c3ddcfabd6eb024eace15
Then where we rejiggered this / renamed them to break-after it just got carried forward.
Description
•