-
Notifications
You must be signed in to change notification settings - Fork 6
/
_objects.pack.scss
175 lines (118 loc) · 3.75 KB
/
_objects.pack.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*------------------------------------*\
#PACK
\*------------------------------------*/
/**
* The pack object simply causes any number of elements pack up horizontally to
* automatically fill an equal, fluid width of their parent.
*/
// Predefine the variables below in order to alter and enable specific features.
$inuit-pack-namespace: $inuit-namespace !default;
$inuit-pack-gutter: $inuit-base-spacing-unit !default;
$inuit-pack-gutter--tiny: quarter($inuit-pack-gutter) !default;
$inuit-pack-gutter--small: halve($inuit-pack-gutter) !default;
$inuit-pack-gutter--large: double($inuit-pack-gutter) !default;
$inuit-pack-gutter--huge: quadruple($inuit-pack-gutter) !default;
$inuit-enable-pack--auto: false !default;
$inuit-enable-pack--tiny: false !default;
$inuit-enable-pack--small: false !default;
$inuit-enable-pack--large: false !default;
$inuit-enable-pack--huge: false !default;
$inuit-enable-pack--rev: false !default;
$inuit-enable-pack--middle: false !default;
$inuit-enable-pack--bottom: false !default;
/**
* 1. Fill all available space.
* 2. Cause children to be automatically equally sized.
* 3. All items are aligned to the tops of each other.
*/
.#{$inuit-pack-namespace}pack,
%#{$inuit-pack-namespace}pack {
border-spacing: 0;
width: 100%; /* [1] */
display: table;
table-layout: fixed; /* [2] */
vertical-align: top; /* [3] */
}
/**
* Cause children to adopt table-like structure.
*/
.#{$inuit-pack-namespace}pack__item,
%#{$inuit-pack-namespace}pack__item {
display: table-cell;
@if ($inuit-enable-pack--middle == true) {
/**
* All items are aligned to the middles of each other.
*/
.#{$inuit-pack-namespace}pack--middle > &,
%#{$inuit-pack-namespace}pack--middle > & {
vertical-align: middle;
}
}
@if ($inuit-enable-pack--bottom == true) {
/**
* All items are aligned to the bottoms of each other.
*/
.#{$inuit-pack-namespace}pack--bottom > &,
%#{$inuit-pack-namespace}pack--bottom > & {
vertical-align: bottom;
}
}
}
@if ($inuit-enable-pack--auto == true) {
/**
* Cause children to pack up into available space, but not equally sized.
*/
.#{$inuit-pack-namespace}pack--auto,
%#{$inuit-pack-namespace}pack--auto {
table-layout: auto;
}
}
@if ($inuit-enable-pack--tiny == true) {
/**
* Tiny gutters between items.
*/
.#{$inuit-pack-namespace}pack--tiny,
%#{$inuit-pack-namespace}pack--tiny {
border-spacing: $inuit-pack-gutter--tiny;
}
}
@if ($inuit-enable-pack--small == true) {
/**
* Small gutters between items.
*/
.#{$inuit-pack-namespace}pack--small,
%#{$inuit-pack-namespace}pack--small {
border-spacing: $inuit-pack-gutter--small;
}
}
@if ($inuit-enable-pack--large == true) {
/**
* Large gutters between items.
*/
.#{$inuit-pack-namespace}pack--large,
%#{$inuit-pack-namespace}pack--large {
border-spacing: $inuit-pack-gutter--large;
}
}
@if ($inuit-enable-pack--huge == true) {
/**
* Huge gutters between items.
*/
.#{$inuit-pack-namespace}pack--huge,
%#{$inuit-pack-namespace}pack--huge {
border-spacing: $inuit-pack-gutter--huge;
}
}
@if ($inuit-enable-pack--rev == true) {
/**
* Reversed order packs.
*/
.#{$inuit-pack-namespace}pack--rev,
%#{$inuit-pack-namespace}pack--rev {
direction: rtl;
> .#{$inuit-pack-namespace}pack__item,
> %#{$inuit-pack-namespace}pack__item {
direction: ltr;
}
}
}