|
| 1 | +# CSS Grid Layout Snippets |
| 2 | + |
| 3 | +[](https://atom.io/packages/css-grid-snippets) |
| 4 | +[](https://atom.io/packages/css-grid-snippets) |
| 5 | +[](https://atom.io/packages/css-grid-snippets) |
| 6 | + |
| 7 | +###### An Atom Package - [Atom.io](https://atom.io/packages/css-grid-snippets) : [GitHub](https://github.com/pushedskydiver/atom-css-grid-snippets) |
| 8 | + |
| 9 | +Shorthand [snippets](https://atom.io/packages/snippets) for CSS, SCSS, Sass, and Less. |
| 10 | + |
| 11 | +## Preview |
| 12 | + |
| 13 | + |
| 14 | +## What is CSS Grid Layout? |
| 15 | +To put it simply CSS Grid Layout (aka "Grid"), is a two-dimensional grid-based layout system that aims to do nothing less than completely change the way we design grid-based user interfaces. It hasn't been added yet to modern browsers but is expected to be added within the coming months. |
| 16 | + |
| 17 | +### What's Included? |
| 18 | +You can see the list of the CSS grid snippets in the tables below. I have organized the tables into grid container and grid item snippets. Alternatively, once you install the package you can view the snippets in the Settings View. Basically, it's snippets like `dg` for ```display: grid;``` and `gg` for ```grid-gap: 20px;```. |
| 19 | + |
| 20 | +### Grid Container Snippets |
| 21 | + |
| 22 | +| Property | Snippet | |
| 23 | +| :-------------------------------- | :------------ | |
| 24 | +| align-content | ac | |
| 25 | +| align-content: center; | acc | |
| 26 | +| align-content: end; | ace | |
| 27 | +| align-content: start; | acs | |
| 28 | +| align-content: space-around; | acsa | |
| 29 | +| align-content: space-between; | acsb | |
| 30 | +| align-content: space-evenly; | acse | |
| 31 | +| align-items | ai | |
| 32 | +| align-items: center; | aic | |
| 33 | +| align-items: end; | aie | |
| 34 | +| align-items: start; | ais | |
| 35 | +| align-items: stretch; | aistr | |
| 36 | +| display: inline-grid; | disig | |
| 37 | +| display: grid; | disg | |
| 38 | +| display: subgrid; | dissg | |
| 39 | +| grid-auto-columns | gac | |
| 40 | +| grid-auto-rows | gar | |
| 41 | +| grid-auto-flow | gaf | |
| 42 | +| grid-auto-flow: column; | gafc | |
| 43 | +| grid-auto-flow: dense; | gafd | |
| 44 | +| grid-auto-flow: row; | gafr | |
| 45 | +| grid-column-gap | gcg | |
| 46 | +| grid-gap | gg | |
| 47 | +| grid-row-gap | grg | |
| 48 | +| grid-template-areas | gta | |
| 49 | +| grid-template-columns | gtc | |
| 50 | +| grid-template-rows | gtr | |
| 51 | +| justify-content | jc | |
| 52 | +| justify-content: center; | jcc | |
| 53 | +| justify-content: end; | jce | |
| 54 | +| justify-content: start; | jcs | |
| 55 | +| justify-content: space-around; | jcsa | |
| 56 | +| justify-content: space-between; | jcsb | |
| 57 | +| justify-items | ji | |
| 58 | +| justify-items: center; | jic | |
| 59 | +| justify-items: end; | jie | |
| 60 | +| justify-items: start; | jis | |
| 61 | +| justify-items: stretch; | jistr | |
| 62 | + |
| 63 | +### Grid Item Snippets |
| 64 | + |
| 65 | +| Property | Snippet | |
| 66 | +| --------------------------------- | ------------- | |
| 67 | +| align-self | als | |
| 68 | +| align-self: center; | alsc | |
| 69 | +| align-self: end; | alse | |
| 70 | +| align-self: start; | alss | |
| 71 | +| align-self: stretch; | alsstr | |
| 72 | +| grid-area | gra | |
| 73 | +| grid-column | gc | |
| 74 | +| grid-column-end | gce | |
| 75 | +| grid-column-start | gcs | |
| 76 | +| grid-row | gr | |
| 77 | +| grid-row-start | grs | |
| 78 | +| grid-row-end | gre | |
| 79 | +| justify-self | js | |
| 80 | +| justify-self: center; | jsc | |
| 81 | +| justify-self: end; | jse | |
| 82 | +| justify-self: start; | jss | |
| 83 | +| justify-self: stretch; | jsstr | |
| 84 | + |
| 85 | +### Want To Learn CSS Grid? |
| 86 | +If you are new or have never heard of CSS Grid before, then now is the time to learn, with browsers ready to start shipping it very soon. |
| 87 | + |
| 88 | +For more information about grid and how to learn it, checkout out [gridbyexample.com](http://gridbyexample.com "Grid By Example homepage"), created by [Rachel Andrew](https://rachelandrew.co.uk "Rachel Andrew's website") who has been at the forefront of grid layout research. |
| 89 | + |
| 90 | +### Grid Layout Learning Resources |
| 91 | +* [gridbyexample.com](http://gridbyexample.com "Grid By Example homepage") |
| 92 | +* [css-tricks.com](https://css-tricks.com/snippets/css/complete-guide-grid/ "A Complete Guide to Grid") |
| 93 | +* [sitepoint.com](https://www.sitepoint.com/introducing-the-css-grid-layout/ "Introducing the CSS Grid Layout") |
| 94 | + |
| 95 | +### Notes |
| 96 | +Issues and Pull Requests are welcome. |
0 commit comments