Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11533 closed bug (plugin)

Normalize css.clip

Reported by: SineSwiper Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


The $.css('clip') command is not normalized across browsers. The "getClip" code found here should be implemented within jQuery to make sure it works in IE and others.

Furthermore, the clipTop/Bottom/Left/Right properties should also be normalized in the other direction, so that they can easily by used in animate operations.

Change History (4)

comment:1 Changed 11 years ago by SineSwiper

Here is an optimized code block

      return (!elem.style.clip && elem.currentStyle) ?
         // IE refuses to return 'clip'
         // but has no problem with 'clipTop' and the likes
         // This unpleasantness reconstructs what a "good" browser would return
         + elem.currentStyle.clipTop    + ', '
         + elem.currentStyle.clipRight  + ', '
         + elem.currentStyle.clipBottom + ', '
         + elem.currentStyle.clipLeft   + ')'
      : elem.style.clip;

comment:2 Changed 11 years ago by dmethvin

Resolution: plugin
Status: newclosed

I think the pattern to be followed here is the color plugin. We don't need to add this to core, it's not a common need.

comment:3 Changed 11 years ago by SineSwiper

What does the color plugin have to do with the clip property?

comment:4 Changed 11 years ago by dmethvin

Neither belong in core?

Note: See TracTickets for help on using tickets.