Proposal: Merge PR74

22 views
Skip to first unread message

TeslaNick

unread,
May 9, 2013, 2:37:22 PM5/9/13
to yuicom...@googlegroups.com

Pull request 74 fixes an "issue" where uncompressed invalid CSS will display correctly while compressed CSS will be broken. The particular instance this fixes is rgb values above 255. For example, if I have a css rule:
background-color: rgb(256,110,200);
This will render pink in the browsers I've tested against (Chrome and Firefox). The browser rounds the offending number down to 255 when its interpreting the number. However, if this rule is compressed by the CSS compressor, it will translate to:
background-color: #1006ec8;
The extra digit makes the color invalid, and the rule is dropped by the browser as malformed. The result is that it appears transparent.

The PR includes additional tests that cover this edge case, and Travis says it's ready to merge.


Nick

Joey Smith

unread,
May 9, 2013, 7:23:05 PM5/9/13
to yuicom...@googlegroups.com
I asked TeslaNick to post this because I wanted to get a feel for the community's preference. CSS3-Color says that colors "outside the device gamut should be clipped or mapped", which is what the browser is doing here. However, there might be value in having YUICompressor refuse to clip these values and instead intentionally error out.

Anyone who has an opinion on these options, please speak up! :)

Joey Smith

unread,
May 20, 2013, 10:49:18 AM5/20/13
to yuicom...@googlegroups.com
Consensus on Github issue was that PR74 was the better solution; merged.


On Thursday, May 9, 2013 12:37:22 PM UTC-6, TeslaNick wrote:
Reply all
Reply to author
Forward
0 new messages