js/OverlayScrollbars.js
function isSizeAffectingCSSProperty(propertyName) {
                    if (!_initialized)
                        return true;
                    var flexGrow = 'flex-grow';
                    var flexShrink = 'flex-shrink';
                    var flexBasis = 'flex-basis';
                    var affectingPropsX = [
                        _strWidth,
                        _strMinMinus + _strWidth,
                        _strMaxMinus + _strWidth,
                        _strMarginMinus + _strLeft,
                        _strMarginMinus + _strRight,
                        _strLeft,
                        _strRight,
                        'font-weight',
                        'word-spacing',
                        flexGrow,
                        flexShrink,
                        flexBasis
                    ];
                    var affectingPropsXContentBox = [
                        _strPaddingMinus + _strLeft,
                        _strPaddingMinus + _strRight,
                        _strBorderMinus + _strLeft + _strWidth,
                        _strBorderMinus + _strRight + _strWidth
                    ];
                    var affectingPropsY = [
                        _strHeight,
                        _strMinMinus + _strHeight,
                        _strMaxMinus + _strHeight,
                        _strMarginMinus + _strTop,
                        _strMarginMinus + _strBottom,
                        _strTop,
                        _strBottom,
                        'line-height',
                        flexGrow,
                        flexShrink,
                        flexBasis
                    ];
                    var affectingPropsYContentBox = [
                        _strPaddingMinus + _strTop,
                        _strPaddingMinus + _strBottom,
                        _strBorderMinus + _strTop + _strWidth,
                        _strBorderMinus + _strBottom + _strWidth
                    ];
                    var _strS = 's';
                    var _strVS = 'v-s';
                    var checkX = _overflowBehaviorCache.x === _strS || _overflowBehaviorCache.x === _strVS;
                    var checkY = _overflowBehaviorCache.y === _strS || _overflowBehaviorCache.y === _strVS;
                    var sizeIsAffected = false;
                    var checkPropertyName = function (arr, name) {
                        for (var i = 0; i < arr[LEXICON.l]; i++) {
                            if (arr[i] === name)
                                return true;
                        }
                        return false;
                    };

                    if (checkY) {
                        sizeIsAffected = checkPropertyName(affectingPropsY, propertyName);
                        if (!sizeIsAffected && !_isBorderBox)
                            sizeIsAffected = checkPropertyName(affectingPropsYContentBox, propertyName);
                    }
                    if (checkX && !sizeIsAffected) {
                        sizeIsAffected = checkPropertyName(affectingPropsX, propertyName);
                        if (!sizeIsAffected && !_isBorderBox)
                            sizeIsAffected = checkPropertyName(affectingPropsXContentBox, propertyName);
                    }
                    return sizeIsAffected;
                }
function isSizeAffectingCSSProperty(propertyName) {
                    if (!_initialized)
                        return true;
                    var flexGrow = 'flex-grow';
                    var flexShrink = 'flex-shrink';
                    var flexBasis = 'flex-basis';
                    var affectingPropsX = [
                        _strWidth,
                        _strMinMinus + _strWidth,
                        _strMaxMinus + _strWidth,
                        _strMarginMinus + _strLeft,
                        _strMarginMinus + _strRight,
                        _strLeft,
                        _strRight,
                        'font-weight',
                        'word-spacing',
                        flexGrow,
                        flexShrink,
                        flexBasis
                    ];
                    var affectingPropsXContentBox = [
                        _strPaddingMinus + _strLeft,
                        _strPaddingMinus + _strRight,
                        _strBorderMinus + _strLeft + _strWidth,
                        _strBorderMinus + _strRight + _strWidth
                    ];
                    var affectingPropsY = [
                        _strHeight,
                        _strMinMinus + _strHeight,
                        _strMaxMinus + _strHeight,
                        _strMarginMinus + _strTop,
                        _strMarginMinus + _strBottom,
                        _strTop,
                        _strBottom,
                        'line-height',
                        flexGrow,
                        flexShrink,
                        flexBasis
                    ];
                    var affectingPropsYContentBox = [
                        _strPaddingMinus + _strTop,
                        _strPaddingMinus + _strBottom,
                        _strBorderMinus + _strTop + _strWidth,
                        _strBorderMinus + _strBottom + _strWidth
                    ];
                    var _strS = 's';
                    var _strVS = 'v-s';
                    var checkX = _overflowBehaviorCache.x === _strS || _overflowBehaviorCache.x === _strVS;
                    var checkY = _overflowBehaviorCache.y === _strS || _overflowBehaviorCache.y === _strVS;
                    var sizeIsAffected = false;
                    var checkPropertyName = function (arr, name) {
                        for (var i = 0; i < arr[LEXICON.l]; i++) {
                            if (arr[i] === name)
                                return true;
                        }
                        return false;
                    };

                    if (checkY) {
                        sizeIsAffected = checkPropertyName(affectingPropsY, propertyName);
                        if (!sizeIsAffected && !_isBorderBox)
                            sizeIsAffected = checkPropertyName(affectingPropsYContentBox, propertyName);
                    }
                    if (checkX && !sizeIsAffected) {
                        sizeIsAffected = checkPropertyName(affectingPropsX, propertyName);
                        if (!sizeIsAffected && !_isBorderBox)
                            sizeIsAffected = checkPropertyName(affectingPropsXContentBox, propertyName);
                    }
                    return sizeIsAffected;
                }
function isSizeAffectingCSSProperty ( propertyName ) { if ( ! _initialized ) return true ; var flexGrow = 'flex-grow' ; var flexShrink = 'flex-shrink' ; var flexBasis = 'flex-basis' ; var affectingPropsX = [ _strWidth , _strMinMinus + _strWidth , _strMaxMinus + _strWidth , _strMarginMinus + _strLeft , _strMarginMinus + _strRight , _strLeft , _strRight , 'font-weight' , 'word-spacing' , flexGrow , flexShrink , flexBasis ] ; var affectingPropsXContentBox = [ _strPaddingMinus + _strLeft , _strPaddingMinus + _strRight , _strBorderMinus + _strLeft + _strWidth , _strBorderMinus + _strRight + _strWidth ] ; var affectingPropsY = [ _strHeight , _strMinMinus + _strHeight , _strMaxMinus + _strHeight , _strMarginMinus + _strTop , _strMarginMinus + _strBottom , _strTop , _strBottom , 'line-height' , flexGrow , flexShrink , flexBasis ] ; var affectingPropsYContentBox = [ _strPaddingMinus + _strTop , _strPaddingMinus + _strBottom , _strBorderMinus + _strTop + _strWidth , _strBorderMinus + _strBottom + _strWidth ] ; var _strS = 's' ; var _strVS = 'v-s' ; var checkX = _overflowBehaviorCache . x === _strS || _overflowBehaviorCache . x === _strVS ; var checkY = _overflowBehaviorCache . y === _strS || _overflowBehaviorCache . y === _strVS ; var sizeIsAffected = false ; var checkPropertyName = function ( arr , name ) { for ( var i = 0 ; i < arr [ LEXICON . l ] ; i ++ ) { if ( arr [ i ] === name ) return true ; } return false ; } ; if ( checkY ) { sizeIsAffected = checkPropertyName ( affectingPropsY , propertyName ) ; if ( ! sizeIsAffected && ! _isBorderBox ) sizeIsAffected = checkPropertyName ( affectingPropsYContentBox , propertyName ) ; } if ( checkX && ! sizeIsAffected ) { sizeIsAffected = checkPropertyName ( affectingPropsX , propertyName ) ; if ( ! sizeIsAffected && ! _isBorderBox ) sizeIsAffected = checkPropertyName ( affectingPropsXContentBox , propertyName ) ; } return sizeIsAffected ; }
Checks is a CSS Property of a child element is affecting the scroll size of the content.
@param propertyName The CSS property name.
@returns {boolean} True if the property is affecting the content scroll size, false otherwise.
Checks is a CSS Property of a child element is affecting the scroll size of the content .