Setting fixed height panes based on window's width
Your provided code is fairly small, so there's not much to review, but nevertheless.



Your comment on making 768 a constant is a valid idea,

const MAX_WINDOW_WIDTH = 768;

...

if (window.innerWidth &gt; MAX_WINDOW_WIDTH) {


for magic numbers (unexplained numbers meaning unexplained things), it's best to declare as a const, but your version of JavaScript may not support this, so you can also use var.



I don't particularly understand why you have double underlines in '.search__results', and to answer your question: you could declare it as a variable if you like, but it really wouldn't matter either way.

I think 'overflow-y-scroll' is a bad name for a CSS class as it's, basically the content of the class.


  where it is the single point for setting the breakpoints?


You can set breakpoints in the relevant debugger on your browser, usually labelled Developer Options, or something similar.



You don't really need to worry about your code violating DRY principles, the if-else loop cases aren't really similar enough for that. If you had something like twenty identical lines in there, maybe so.



Good questions, and clean code, good work!