Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery css Compass-like correction

jQuery has opacity correction when you use css method (lines 4592-4608 on jQuery 1.4.2):

    // IE uses filters for opacity
    if ( !jQuery.support.opacity && name === "opacity" ) {
        if ( set ) {
            // IE has trouble with opacity if it does not have layout
            // Force it by setting the zoom level
            style.zoom = 1;

            // Set the alpha filter to set the opacity
            var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
            var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
            style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
        }

        return style.filter && style.filter.indexOf("opacity=") >= 0 ?
            (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
            "";
    }

I've started extending this behaviour to turn css 3 selectors multi browser compatible (using a lot of recipes that the Compass framework implements).

Is there a project that already does this?

like image 713
Daniel Ribeiro Avatar asked Mar 09 '26 07:03

Daniel Ribeiro


1 Answers

There are various projects that cover different aspects of CSS3. AFAIK there's no decent unified project.

I'm currently using: http://plugins.jquery.com/project/2d-transform

for CSS3 transforms. I can't really feel comfortable recommending other projects at this time.

There's also: http://plugins.jquery.com/project/corners

like image 90
Mark Avatar answered Mar 11 '26 22:03

Mark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!