Elementor: two ways to add an offset to the Table of Contents widget when scrolling – tutorial with code

Table of Contents is a relatively new Elementor Pro widget that is very useful and works well. However, it does not have a built-in option to define an offset when scrolling content. Here are two different and independent ways to overcome this shortcoming.
Creating a Shrinking Sticky Header With Elementor Pro

Shrinking the sticky header when scrolling is useful, and one of the most requested additional functions when creating a site. In this tutorial, I explained in detail a simple way to create a shrinking sticky header, without additional plugins and without relying on a WP theme, using only Elementor Pro and custom code. The tutorial brings custom code, written simply and comprehensible which can be easily adapted to your needs. The tutorial also explains the implementation of this code.