In brief
max-height places an upper bound on height but does not itself decide what happens to excess content. Overflow rules also control that behaviour.
Useful to know
max-height places an upper bound on height but does not itself decide what happens to excess content. Overflow rules also control that behaviour. [1]
For a long panel list, consider max-height and overflow-y together. The scrolling area should remain usable rather than simply clipping text. Also check whether keyboard users can reach its contents.
Sources
For further detail and to check the information: