|
1 | 1 | # Pack
|
2 | 2 |
|
3 |
| -inuitcss’ `pack` object simply causes any number of elements pack up |
4 |
| -horizontally to automatically fill an equal, fluid width of their parent. |
| 3 | +inuitcss’ Pack object simply causes any number of elements pack up horizontally |
| 4 | +to automatically fill an equal, fluid width of their parent. |
5 | 5 |
|
6 |
| -Install using Bower: |
| 6 | +## Dependencies |
| 7 | + |
| 8 | +inuitcss’ Pack object depends on two other inuitcss modules: |
| 9 | + |
| 10 | +* [settings.defaults](https://github.com/inuitcss/settings.defaults) |
| 11 | +* [tools.functions](https://github.com/inuitcss/tools.functions) |
| 12 | + |
| 13 | +If you install the Pack object using Bower, you will get these dependencies at |
| 14 | +the same time. If not using Bower, please be sure to install and `@import` these |
| 15 | +dependencies in the relevant way. |
| 16 | + |
| 17 | +## Installation |
| 18 | + |
| 19 | +The recommended installation method is Bower, but you can install the Pack |
| 20 | +module via a Git Submodule, or copy and paste. |
| 21 | + |
| 22 | +### Install using Bower: |
7 | 23 |
|
8 | 24 | $ bower install --save inuit-pack
|
| 25 | + |
| 26 | +Once installed, `@import` into your project in its Objects layer: |
| 27 | + |
| 28 | + @import "bower_components/inuit-pack/objects.pack"; |
| 29 | + |
| 30 | +### Install as a Git Submodule |
| 31 | + |
| 32 | + $ git submodule add [email protected]:inuitcss/objects.pack.git |
| 33 | + |
| 34 | +Once installed, `@import` into your project in its Objects layer: |
| 35 | + |
| 36 | + @import "objects.pack/objects.pack"; |
| 37 | + |
| 38 | +### Install via file download |
| 39 | + |
| 40 | +The least recommended option for installation is to simply download |
| 41 | +`_objects.pack.scss` into your project and `@import` it into your project in |
| 42 | +its Objects layer. |
| 43 | + |
| 44 | +## Usage |
| 45 | + |
| 46 | +Basic usage of the Pack object uses the required classes: |
| 47 | + |
| 48 | + <div class="pack"> |
| 49 | + <div class="pack__item"> |
| 50 | + Foo |
| 51 | + </div> |
| 52 | + <div class="pack__item"> |
| 53 | + Bar |
| 54 | + </div> |
| 55 | + <div class="pack__item"> |
| 56 | + Baz |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + |
| 60 | +The only valid children of the `.pack` node are `.pack__item`s. |
| 61 | + |
| 62 | +## Options |
| 63 | + |
| 64 | +Other, optional classes can supplement the required base classes: |
| 65 | + |
| 66 | +* `.pack--auto`: cause packed items to have an automatically determined, |
| 67 | + non-equal width. |
| 68 | +* `.pack--[tiny|small|large|huge]`: alter the gutter between pack items. |
| 69 | +* `.pack--rev`: reverse the rendered horizontal order of packed items. |
| 70 | +* `.pack--[middle|bottom]`: align packed items to the middles or bottoms of each |
| 71 | + other. |
| 72 | + |
| 73 | +For example: |
| 74 | + |
| 75 | + <div class="pack pack--small pack--rev"> |
| 76 | + <div class="pack__item"> |
| 77 | + Foo |
| 78 | + </div> |
| 79 | + <div class="pack__item"> |
| 80 | + Bar |
| 81 | + </div> |
| 82 | + <div class="pack__item"> |
| 83 | + Baz |
| 84 | + </div> |
| 85 | + </div> |
0 commit comments