Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

color intercepts textshadow's color #27

Open
paulirish opened this Issue · 2 comments

3 participants

@paulirish

see testcase by chris coyier: http://jsbin.com/usalu5/edit

the textShadowColor hook in color.js overwrites the textShadowColor hook defined in textshadow.js

and apparently the color.js one doesnt work?

Regardless... there is some conflict here.

(the fix is to put textshadow.js after color.js in the source, but i think this still points to a bug .. )

@louisremi
Collaborator

Thank you for reporting this issue Paul, I'm looking into it right now.

@pdokas
Collaborator

textshadow.js relies on color.js (final line here):

            $.cssHooks[hook] = {
                get: function(elem, computed, extra) {
                    return (function(elem, pos, prop) {
                        var shadow = $.css(elem, propStr),
                            color = $.color.normalize(shadow),
                            ...

So color.js should be included before any other cssHook that relies on its normalization feature.

As for why it doesn't error when you include textshadow.js before color.js is a bit of a mystery to me at the moment. I'll look into more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.