2 thoughts on “Calculating nth-child CSS Selector Formulae Leave a comment

  1. Quick question, is there any performance benefit to doing this type of logic with pure CSS or using a library like JQuery.

    Part of me thinks that JQuery would be easier to read and less complicated.

    Thoughts?

    1. I suspect there’s a small performance benefit – plus you won’t get the flash of unstyled content (since the styles will be added immediately and not have to wait for the js). Also – CSS will work when javascript is disabled.

Leave a Reply

Your email address will not be published. Required fields are marked *