Why do we use screen.width instead of window.innerWidth ? In the future this code can be used inside widgets, and you likely want to align this to the size of the container window, not the screen.