If the max-width is 50vw, then resizing the viewport will change the sidebar width and the callbacks need to be called in such a case.
And use a ResizeObserver in order to avoid to have to compare the width with min/max which can be in an other unit than px.
For now its use is limited to the comment sidebar but it'll be used for the new one containing the thumbnails. And make the sidebar more accessible with the keyboard or a screen reader.