I couldn’t find this information anywhere and I think WordPress should at least have a way to tell me what the magic window size is.
At least in OceanWP on WordPress 6.1.1 using Chrome tools I discovered that the hamburger menu is used when the width of the windows is below 960px. I don’t like hard coding this number, I should be able to obtain it via an API (maybe I can but if so I didn’t find it).
As the window size changes client side I used the following code (I gave up on showing the code as it wouldn’t paste into “inline-code” and when added bit by bit formatting was lost).
I had guessed about the CSS, but 960px is still a magic number that in my opinion should be exposed somehow for PHP/Javascript code. I assume its not going to change often so my code matches for now…