Shopify/Timber — pull request #203 by jholl (2014-08-23 17:09:59+00:00)
Title: product loop classes

Attempting to create a little more consistency in behavior on collection grid and list views by refactoring product loop snippets : product-grid-item.liquid and product-list-item.liquid.

* currently collection list product loop items are mostly wrapped in anchor (including description)

* inconsistent use of class `a.product-grid-image` in product-grid-item.liquid vs `img.product-grid-image` in product-list-item.liquid

* class `.product-grid-item` does not exist in the product-grid-item.liquid snippet but does in fact show in the product-list-item.liquid snippet -- this naming of elements can be confusing.

To address all of these, this PR contains the following:

* introduce classes `.product-grid-item` and `.product-list-item` in parent (`div.grid-item`) for snippets product-grid-item.liquid and product-list-item.liquid, respectively. remove use of these classes elsewhere; thus creating unique parent class for each view

* move anchor in `.product-list-item` to only wrap product image as it does in product-grid-item.liquid. Also add to product-list-item.liquid an anchor around product title, as it does in product-grid-item.liquid (therefore consistent objects link to product pages from either collection view)

* introduce ambiguous class of `.product-loop-image` to product image anchors instead of `.product-grid-image` since grid has more specific context now. thus, also remove `.product-grid-image` class references

* adjust theme.scss accordingly