-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path_objects.block.scss
155 lines (106 loc) · 3.69 KB
/
_objects.block.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
/*------------------------------------*\
#BLOCK
\*------------------------------------*/
/**
* The block object simply stacks an image on top of some text-like content.
*/
// Predefine the variables below in order to alter and enable specific features.
$inuit-block-namespace: $inuit-namespace !default;
$inuit-block-gutter: $inuit-base-spacing-unit !default;
$inuit-block-gutter--tiny: quarter($inuit-block-gutter) !default;
$inuit-block-gutter--small: halve($inuit-block-gutter) !default;
$inuit-block-gutter--large: double($inuit-block-gutter) !default;
$inuit-block-gutter--huge: quadruple($inuit-block-gutter) !default;
$inuit-enable-block--flush: false !default;
$inuit-enable-block--tiny: false !default;
$inuit-enable-block--small: false !default;
$inuit-enable-block--large: false !default;
$inuit-enable-block--huge: false !default;
$inuit-enable-block--center: false !default;
$inuit-enable-block--right: false !default;
/**
* Stacked image-with-text object. A simple abstraction to cover a very commonly
* occurring design pattern.
*/
.#{$inuit-block-namespace}block,
%#{$inuit-block-namespace}block {
display: block;
}
/**
* 1. Eliminate whitespace around images.
*/
.#{$inuit-block-namespace}block__img,
%#{$inuit-block-namespace}block__img {
vertical-align: middle; /* [1] */
margin-bottom: $inuit-block-gutter;
@if ($inuit-enable-block--flush == true) {
/**
* No space between the image and the text content.
*/
.#{$inuit-block-namespace}block--flush > &,
%#{$inuit-block-namespace}block--flush > & {
margin-bottom: 0;
}
}
@if ($inuit-enable-block--tiny == true) {
/**
* Tiny space between the image and the text content.
*/
.#{$inuit-block-namespace}block--tiny > &,
%#{$inuit-block-namespace}block--tiny > & {
margin-bottom: $inuit-block-gutter--tiny;
}
}
@if ($inuit-enable-block--small == true) {
/**
* Small space between the image and the text content.
*/
.#{$inuit-block-namespace}block--small > &,
%#{$inuit-block-namespace}block--small > & {
margin-bottom: $inuit-block-gutter--small;
}
}
@if ($inuit-enable-block--large == true) {
/**
* Large space between the image and the text content.
*/
.#{$inuit-block-namespace}block--large > &,
%#{$inuit-block-namespace}block--large > & {
margin-bottom: $inuit-block-gutter--large;
}
}
@if ($inuit-enable-block--huge == true) {
/**
* Huge space between the image and the text content.
*/
.#{$inuit-block-namespace}block--huge > &,
%#{$inuit-block-namespace}block--huge > & {
margin-bottom: $inuit-block-gutter--huge;
}
}
}
/**
* Text-content.
*/
.#{$inuit-block-namespace}block__body,
%#{$inuit-block-namespace}block__body {
display: block;
}
@if ($inuit-enable-block--right == true) {
/**
* Right-aligned blocks.
*/
.#{$inuit-block-namespace}block--right,
%#{$inuit-block-namespace}block--right {
text-align: right;
}
}
@if ($inuit-enable-block--center == true) {
/**
* Center-aligned blocks.
*/
.#{$inuit-block-namespace}block--center,
%#{$inuit-block-namespace}block--center {
text-align: center;
}
}