This adds cssHooks for clip and the individual sides (clip-top, clip-right, clip-bottom, clip-left).
Accessing the individual clip sides is "non-standard", but I added them anyway because:
Retrieving them gets the computed value instead of "auto", i.e. whereas elem.css("clip") may return "auto" (or a rect() with some or all sides as "auto"), elem.css("clip-top") would return "0px". This may be useful when you need a concrete value instead of "auto".
With clip sides returning computed values, animating these becomes possible. Ideally we would support animating a full clip rect() but this was the easier approach.
Clip isn't as popular as many other CSS declarations, and browser support for it could be better (I've documented the browser bugs I've encountered in the source code), but I've used it enough in my work to motivate this code :-)
This adds cssHooks for clip and the individual sides (clip-top, clip-right, clip-bottom, clip-left).
Accessing the individual clip sides is "non-standard", but I added them anyway because:
"auto"
, i.e. whereaselem.css("clip")
may return"auto"
(or arect()
with some or all sides as"auto"
),elem.css("clip-top")
would return"0px"
. This may be useful when you need a concrete value instead of"auto"
.rect()
but this was the easier approach.Clip isn't as popular as many other CSS declarations, and browser support for it could be better (I've documented the browser bugs I've encountered in the source code), but I've used it enough in my work to motivate this code :-)
Thanks, Jeff