Maybe not and I need to do this in HTML but is there a way to write
if($('.Name1 li').length>2) $('.main').css('k', 'v');
I did this in JS and if I am loading the page for the first time I see a noticeable pop happen. Its not ‘bad’ but I do ‘notice’ it.
It would be better if you check this condition on server side (php, ruby, C#, python, whatever) and assign some class then.