> > Message: 24 > Date: Thu, 12 Mar 2015 15:16:23 -0400 > From: Tom Livingston <tom...@gmail.com> > To: CSS Discussion Group <css-d@lists.css-discuss.org> > Subject: [css-d] CSS Grids > Message-ID: > < > calxy60ywwugfudu5uu2zxuus+3ilvkroltfzu6s2rbfozh3...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > List, > > I have not used a grid system in the past but am looking into them. As > I was looking at a DIY grid method I had a question pop into my > head... > > Is it assumed (uh oh) that you would establish your columns with divs, > for example, and insert elements like <aside> into those columns or > would the <aside> just be given the appropriate classes to make it > itself one of the column in the grid - thus eliminating extra markup? > Doesn't matter? Pros and cons? > > > -- > > Tom Livingston | Senior Front-End Developer | Media Logic | > ph: 518.456.3015x231 | fx: 518.456.4279 | medialogic.com > > > #663399 > > > ------------------------------ > > ______________________________________________________________________ > css-discuss [css-d@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > > End of css-d Digest, Vol 148, Issue 1 > ************************************* >
Tom, There is some debate about this, at least amongst some of my peers. I am of the opinion that we should separate the HTML for grids (structure) and their contents (semantics). So create divs for your grid, applying whatever classes needed to give them the desired layout. Then place your articles, sections, asides, etc. within those grid elements. I think of it like book shelves. The grid is the shelf, the content elements are the books on the shelf. Since HTML is responsible for both structure and semantics, our shelves and books are, so to speak, built from the same material. In order to segregate those roles, it makes sense to me to purposefully keep them separated, and agnostic to one another. This not only makes for clean, modular, reusable HTML, it also assists you in keeping your CSS and javascript modular and reusable. Of course this all depends on what you are building, and how much modularity you really need. In some cases, it may be completely possible to merge your structural HTML with your semantic HTML. I have found, in the way I develop, that it is most useful to build modular, semantic code blocks with whatever server-side templating system you might be using (PHP, Rails, Angular, etc), and inject them within a grid structure that is agnostic toward the content it contains. The common argument against this (that I get, anyway) is that it means more divs, and thats bad. I think this is a naive oversimplification. Yes, less HTML means smaller files and quicker http requests, but you have to balance those potential savings with the benefits of building modular, reusable code. Removing a few HTML elements here and there is not going to give you significant savings. There are other, more effective ways of reducing and speeding up http requests (file concatenation, minification, using a CDN, etc) that could be explored. So, my opinion is that, whether or not you build one yourself, or use a prebuilt system (I frequently use Foundation and Bourbon Neat), you should use a dedicated grid system. </rant> Hope this is helpful. -- Andrew Croce andrew.cr...@gmail.com andrewcroce.com 732.995.0590 ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/