I am using SMACSS (scalable and modular architecture for CSS):
http://smacss.com/
In particular, I use the Yahoo Pure CSS platform (SMACSS) (Grids style sheet only):
http://purecss.io/grids/
Is it correct to place the grid inside the module?
For example, here is the grid inside the module 'foo'. The foo module should show a string of three elements.
<div class="foo">
<div class="pure-g">
<div class="pure-u-1-3 foo-thumbnail">Eat</div>
<div class="pure-u-1-3 foo-title">At</div>
<div class="pure-u-1-3 foo-description">Joes!</div>
</div>
</div>
OR, is it more complicated with the SMACSS methodology to remove the grid from the module and write my own CSS to achieve the layout (instead of relying on the grid classes). For example:
<div class="foo">
<div class="foo-thumbnail">Eat</div>
<div class="foo-title">At</div>
<div class="foo-description">Joes!</div>
</div>
source
share