1. 1
  1.  

  2. 1

    The source code is here, it’s 25 lines of vanilla JS: https://github.com/tomhodgins/reprocss/blob/master/mixins/closest-selector.js