Shrink Factors

all on basis of Enfold 5.4.1

shrink amount is more ( or equal for 2 ) than half size of the starting header height. (e.g. 100px to 40px)shrink factor value on line 91 (the denominator value)5432 default
factor value on line 78 (the denominator value)1.251.331.52 default
shrink amount is less than half size of the starting header height. (e.g. 100px to 75px)shrink factor value on line 91 (the denominator value)1.661.51.331.25
factor value on line 78 (the denominator value)2.5345

Calculation is for a wanted shrink-factor:

values

Denominator for line 91 :  f       ⇒    Denominator for line 78   :   f / (f-1)

so if you like to have a less shrinking amount – you had to choose a value  f < 2
so if you like to have a bigger shrinking amount – you had to choose a value  f > 2

This is part of actual (enfold 5.4.1)

avia-snippet-sticky-header.js

by the way:  nice trick to have shrinking but without a visual effect.

Shrink-Factor  ( line 91)  : 1.0001

Factor ( line 78 ) : 10000

now there will be no ( visible ) shrink – but the classes were added to use on css ( header-scrolled and header-scrolled-full)

how to use a child-theme script:

avia-snippet-sticky-header.js

for child-theme functions.php

unload parent script and load the new child-theme script

function wp_change_sticky_header_script() {
   wp_deregister_script( 'avia-sticky-header' );
   wp_enqueue_script( 'avia-sticky-header-child', get_stylesheet_directory_uri().'/js/avia-snippet-sticky-header.js', array('avia-default'), $vn, true);
}
add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );

only needed instead if you want to use minified option on js files.

// for those who like to use the minified js files
// they have to create a min version of the edited file
// and upload both files to that child-theme subfolder : js

function wp_change_sticky_header_script() {
  wp_deregister_script( 'avia-sticky-header' );

  $vn = avia_get_theme_version();
  $options = avia_get_option();
  $child_theme_url = get_stylesheet_directory_uri();

  $min_js = avia_minify_extension( 'js' );
  //  $min_css = avia_minify_extension( 'css' );  for that js - file not needed to mention here

  $condition  = ( isset( $options['header_position'] ) && $options['header_position'] == 'header_top' );
  $condition2 = ( isset( $options['header_sticky'] ) && $options['header_sticky'] == 'header_sticky' ) && $condition;
  avia_enqueue_script_conditionally( $condition2 , 'avia-sticky-header-child', "{$child_theme_url}/js/avia-snippet-sticky-header{$min_js}.js", array('avia-default'), $vn, true);
}
add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );

a good compressor for js – files can be found here:  https://jscompress.com/