Skip to content

Commit 5b8d4c0

Browse files
committed
Add documentation
1 parent 7a7c4ff commit 5b8d4c0

File tree

2 files changed

+81
-4
lines changed

2 files changed

+81
-4
lines changed

README.md

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,85 @@
11
# Pack
22

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.
55

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:
723

824
$ 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>

_objects.pack.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ $inuit-pack-gutter--small: halve($inuit-pack-gutter) !default;
1616
$inuit-pack-gutter--large: double($inuit-pack-gutter) !default;
1717
$inuit-pack-gutter--huge: quadruple($inuit-pack-gutter) !default;
1818

19+
$inuit-enable-pack--auto: false !default;
1920
$inuit-enable-pack--tiny: false !default;
2021
$inuit-enable-pack--small: false !default;
2122
$inuit-enable-pack--large: false !default;
2223
$inuit-enable-pack--huge: false !default;
2324
$inuit-enable-pack--rev: false !default;
2425
$inuit-enable-pack--middle: false !default;
2526
$inuit-enable-pack--bottom: false !default;
26-
$inuit-enable-pack--auto: false !default;
2727

2828

2929

0 commit comments

Comments
 (0)