build/out.js
/**
     * @name style
     * @summary Additional scrollbar styles.
     * @desc See type definition for more details. These styles are applied directly to the scrollbar's `bar` element.
     *
     * Values are adjusted as follows before being applied to the element:
     * 1. Included "pseudo-property" names from the scrollbar's orientation hash, {@link FinBar#oh|oh}, are translated to actual property names before being applied.
     * 2. When there are margins, percentages are translated to absolute pixel values because CSS ignores margins in its percentage calculations.
     * 3. If you give a value without a unit (a raw number), "px" unit is appended.
     *
     * General notes:
     * 1. It is always preferable to specify styles via a stylesheet. Only set this property when you need to specifically override (a) stylesheet value(s).
     * 2. Can be set directly or via calls to the {@link FinBar#resize|resize} method.
     * 3. Should only be set after the scrollbar has been inserted into the DOM.
     * 4. Before applying these new values to the element, _all_ in-line style values are reset (by removing the element's `style` attribute), exposing inherited values (from stylesheets).
     * 5. Empty object has no effect.
     * 6. Falsey value in place of object has no effect.
     *
     * > CAVEAT: Do not attempt to treat the object you assign to this property as if it were `this.bar.style`. Specifically, changing this object after assigning it will have no effect on the scrollbar. You must assign it again if you want it to have an effect.
     *
     * @see {@link FinBar#barStyles|barStyles}
     * @type {finbarStyles}
     * @memberOf FinBar.prototype
     */
@name style
@summary Additional scrollbar styles.
@desc See type definition for more details. These styles are applied directly to the scrollbar's `bar` element.

Values are adjusted as follows before being applied to the element:
1. Included "pseudo-property" names from the scrollbar's orientation hash,  FinBar#oh|oh, are translated to actual property names before being applied.
2. When there are margins, percentages are translated to absolute pixel values because CSS ignores margins in its percentage calculations.
3. If you give a value without a unit (a raw number), "px" unit is appended.

General notes:
1. It is always preferable to specify styles via a stylesheet. Only set this property when you need to specifically override (a) stylesheet value(s).
2. Can be set directly or via calls to the  FinBar#resize|resize method.
3. Should only be set after the scrollbar has been inserted into the DOM.
4. Before applying these new values to the element, _all_ in-line style values are reset (by removing the element's `style` attribute), exposing inherited values (from stylesheets).
5. Empty object has no effect.
6. Falsey value in place of object has no effect.

> CAVEAT: Do not attempt to treat the object you assign to this property as if it were `this.bar.style`. Specifically, changing this object after assigning it will have no effect on the scrollbar. You must assign it again if you want it to have an effect.


@name style @summary Additional scrollbar styles . @desc See type definition for more details . These styles are applied directly to the scrollbar ' s ` bar ` element . Values are adjusted as follows before being applied to the element : 1 . Included " pseudo - property " names from the scrollbar ' s orientation hash FinBar#oh|oh are translated to actual property names before being applied . 2 . When there are margins percentages are translated to absolute pixel values because CSS ignores margins in its percentage calculations . 3 . If you give a value without a unit ( a raw number ) " px " unit is appended . General notes : 1 . It is always preferable to specify styles via a stylesheet . Only set this property when you need to specifically override ( a ) stylesheet value ( s ) . 2 . Can be set directly or via calls to the FinBar#resize|resize method . 3 . Should only be set after the scrollbar has been inserted into the DOM . 4 . Before applying these new values to the element _all_ in - line style values are reset ( by removing the element ' s ` style ` attribute ) exposing inherited values ( from stylesheets ) . 5 . Empty object has no effect . 6 . Falsey value in place of object has no effect . > CAVEAT : Do not attempt to treat the object you assign to this property as if it were ` this . bar . style ` . Specifically changing this object after assigning it will have no effect on the scrollbar . You must assign it again if you want it to have an effect .
set style(styles) {
        var keys = Object.keys(styles = extend({}, styles, this._auxStyles));
        if (keys.length) {
            var bar = this.bar,
                barRect = bar.getBoundingClientRect(),
                container = this.container || bar.parentElement,
                containerRect = container.getBoundingClientRect(),
                oh = this.oh;
            bar.removeAttribute('style');
            keys.forEach(function (key) {
                var val = styles[key];
                if (key in oh) {
                    key = oh[key];
                }
                if (!isNaN(Number(val))) {
                    val = (val || 0) + 'px';
                } else if (/%$/.test(val)) {
                    var oriented = axis[key],
                        margins = barRect[oriented.marginLeading] + barRect[oriented.marginTrailing];
                    if (margins) {
                        val = parseInt(val, 10) / 100 * containerRect[oriented.size] - margins + 'px';
                    }
                }
                bar.style[key] = val;
            });
        }
    }
set style ( styles ) { var keys = Object . keys ( styles = extend ( { } , styles , this . _auxStyles ) ) ; if ( keys . length ) { var bar = this . bar , barRect = bar . getBoundingClientRect ( ) , container = this . container || bar . parentElement , containerRect = container . getBoundingClientRect ( ) , oh = this . oh ; bar . removeAttribute ( 'style' ) ; keys . forEach ( function ( key ) { var val = styles [ key ] ; if ( key in oh ) { key = oh [ key ] ; } if ( ! isNaN ( Number ( val ) ) ) { val = ( val || 0 ) + 'px' ; } else if ( / %$ / . test ( val ) ) { var oriented = axis [ key ] , margins = barRect [ oriented . marginLeading ] + barRect [ oriented . marginTrailing ] ; if ( margins ) { val = parseInt ( val , 10 ) / 100 * containerRect [ oriented . size ] - margins + 'px' ; } } bar . style [ key ] = val ; } ) ; } }
@name style
 @summary Additional scrollbar styles.
@name style @summary Additional scrollbar styles .
// Before applying new styles, revert all styles to values inherited from stylesheets // When bar size given as percentage of container, if bar has margins, restate size in pixels less margins. // (If left as percentage, CSS's calculation will not exclude margins.)