{Carrer web log}


Blog about web design & development

SMART CSS GRID

Wednesday, May 02, 2018 { 0 Comments }

I love small code libraries that work. Most of todays popular CSS Frameworks are huge and probably an average web site will use only 5-10% of that frameworks code. Yes, you can use tree shaking and caching but how many web sites actually do this? I prefer start small and gradually upgrade.

I’ve did some experimenting with the new CSS Grid and it’s specially great if you have graphic design background. It probably is most logical system if you are starting with HTML + CSS layouts. Also it generates much cleaner HTML avoiding unnecessary nesting.

Why I build the SMART CSS GRID system?

Because with just with few lines of CSS code you can make super powerful layout system. The theory is that CSS Grid doesn’t need another grid system because is already a grid system. This is true and the purpose of this project is not to make another grid but to reutilise CSS Grid in a smart way. Basically using few CSS classes that you can reutilise in your entire project, rather than making custom CSS for every layout. Don’t repeat yourself.

This project is also meant as starting point. You could and you should change the main .css file directly. You can easily change the main width of the layout that currently is 960px or change the grid margins with any number or unit that you like. Because this is project is only 36 lines of code you will understand what the code does in less than 10 seconds.

What you can do with this system?

You can build 1 to 12 column grid with any size and any grid margin size. You can merge rows, you can swap column places, if necessary any column sell can become entire grid using the .nested class. It is responsive layout and you can personalise its behaviour. You will write less HTML because it uses cleaner CSS architecture, no unnecessary HTML column nesting.

You can find the project here:

https://vladocar.github.io/SMART-CSS-GRID/

or

https://github.com/vladocar/SMART-CSS-GRID

0 Responses to “SMART CSS GRID”

Post a Comment

<< Home

RSS IconTwitter icon Twitter icon Twitter icon

About Me <<<

Name: Vladimir Carrer
vladocar [at] gmail.com
Location: Verona, Italy
I'm a web designer, developer, teacher, speaker, generally web addicted ...

My projects <<<

§§Previous Posts <<<

Hand Drawn Icons
 

Other Profiles <<<

View Vladimir Carrer's profile on LinkedIn

Content is licensed under a Creative Commons Public Domain License