Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmask is too liberal in what it accepts #15772
Comments
|
It's not clear to me why mask-origin and mask-clip must come consecutively. Grammar of mask says they can come in any order but both firefox and chrome don't accept it
First |
|
@dbaron should this be a spec bug or a firefox/chrome bug? |
|
The parsing code in Gecko has this comment:
(see CSSParserImpl::ParseImageLayersItem, which is used by mask layers too). Did the spec quietly change at some point? I'm having a hard time believing that both @dbaron and I misread this in 2013 when he fixed https://bugzilla.mozilla.org/show_bug.cgi?id=570896 Note that https://bugzilla.mozilla.org/show_bug.cgi?id=1188074 exists too. Though that claims that Chrome's behavior doesn't match ours for background... |
|
The spec changed in January 2014. I vaguely recall a discussion, although it's not linked from that changeset. Note that I also filed w3c/fxtf-drafts#118 |
|
(But if Firefox and Chrome both match the old spec, at this point we should probably consider changing the spec back. Do they?) |
|
I've tried only this certain example in Chrome earlier. After trying different cases, it looks like Chrome doesn't accept sub-properties apart from mask-reference.(this was previous spec behavior, I guess) I couldn't see any issue about the mask shorthand in Chrome issue tracker either. |
|
FWIW, Chrome supports the new spec. A simple testcase: <!DOCTYPE html>
<style>
div { -webkit-mask: url(404.png) border-box repeat padding-box; }
</style>
<script>
document.write(document.styleSheets[0].cssRules[0].cssText);
</script>I'm going to change Gecko's behavior to match the spec in bug 1188074 also for behavior of background shorthand. So closing this issue. |
alpha padding-box url(404.png) border-boxshould not be accepted for mask, but it is.cc @canaltinova