News for hackers. Stuff that matters.
Re:Smarter Link Underlines For Every Website by adamschwartz on Monday November 10, 2014 @11:08PM (#8588246)
Thanks!

If a background-image is specified, we abort [1]. (This would apply to CSS gradients as well.) Of course we’d like to support non-solid backgrounds at some point, but short of a true HTML-to-canvas solution, there’s not really that much better you can do without wreaking lots of havoc.

[1]: http://git.io/1WqsAA, http://git.io/n4tRrw

Re:Smarter Link Underlines For Every Website by WiseWeasel on Monday November 10, 2014 @11:41PM (#8588330)
Is this only getting the first container's background? If so, what happens when a layer below that has an image or gradient bkg?
Re:Smarter Link Underlines For Every Website by adamschwartz on Tuesday November 11, 2014 @12:45AM (#8588509)
Nope, it traverses up the DOM until it finds an element which has any non-transparent background. If the first thing it finds has a background-image, it aborts. If it’s a solid color, it returns that container. [1]

This absolutely still is prone to bugs when `position` or other properties are used to move elements visually outside of their parents, but it’s about as good as you can do without a true HTML-to-canvas implementation.

[1]: http://git.io/ChvO3Q