Currently in the process of developing an HTML/CSS template, with plans to incorporate social media icons from the following source:
These icons are available as 41 individual .png files. The goal is to integrate them into the template using CSS classes for easy accessibility, like so:
<i class="icon-twitter"></i>
<i class="icon-facebook"></i>
The dilemma arises regarding whether to reference each icon as a separate file within the CSS classes, or consolidate all 41 icons into a single sprite and adjust the background position for each class (CSS sprites technique).
Considering that the average website may only use about 3 or 4 icons at a time, and the fact that the sprite created is 42kb in size compared to the 2kb average file size for individual files, the question of the most efficient solution arises.
Furthermore, does the distribution of icons within the sprite matter? For instance, should they be arranged in 2 columns and 21 rows, or perhaps 6 columns and 7 rows?
Seeking insights on the best approach for this scenario. Cheers!