CSS: Position sticky js solution : [![question picture][1]][1]


  [1]: https://i.stack.imgur.com/nv3vU.png

I have position sticky block that can be higher than window height and also can be less (depends on viewport). That means in some situations I cannot scroll to overflowed content. Is there a solution that allows to stick block from bottom if this block is bigger than window? 