Board Thread:General Coding Help/@comment-5301680-20170811164136/@comment-27958705-20170811181353

then use .page-name.

if it is ur own element to style, used across bunch of wikia's, then u can add class "my-element-on-mainpage" to it when adding to mainpage (check namsespace against ns:0 and title against wgMainpage).