jquery/jquery

View on GitHub
src/css.js

Summary

Maintainability
C
1 day
Test Coverage

File css.js has 306 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define( [
    "./core",
    "./core/access",
    "./core/camelCase",
    "./var/rcssNum",
Severity: Minor
Found in src/css.js - About 3 hrs to fix

    Function style has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        style: function( elem, name, value, extra ) {
    
            // Don't set styles on text and comment nodes
            if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                return;
    Severity: Minor
    Found in src/css.js - About 1 hr to fix

      Function boxModelAdjustment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
          var i = dimension === "width" ? 1 : 0,
              extra = 0,
              delta = 0;
      
      
      Severity: Minor
      Found in src/css.js - About 1 hr to fix

        Function set has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                set: function( elem, value, extra ) {
                    var matches,
                        styles = getStyles( elem ),
        
                        // Only read styles.position if the test has a chance to fail
        Severity: Minor
        Found in src/css.js - About 1 hr to fix

          Function getWidthOrHeight has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function getWidthOrHeight( elem, dimension, extra ) {
          
              // Start with computed style
              var styles = getStyles( elem ),
                  val = curCSS( elem, dimension, styles ),
          Severity: Minor
          Found in src/css.js - About 1 hr to fix

            Function boxModelAdjustment has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
            Severity: Minor
            Found in src/css.js - About 45 mins to fix

              Consider simplifying this complex logical expression.
              Open

                  if ( ( isBorderBox && !support.boxSizingReliable() || val === "auto" ||
                      !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
                      elem.getClientRects().length ) {
              
                      // Where available, offsetWidth/offsetHeight approximate border box dimensions.
              Severity: Major
              Found in src/css.js - About 40 mins to fix

                There are no issues that match your filters.

                Category
                Status