compass-inuit 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -94,6 +94,7 @@
|
|
94
94
|
* THIS-OR-THIS........Options object
|
95
95
|
* COMPLEX-LINK........
|
96
96
|
* FLYOUT..............Flyout-on-hover object
|
97
|
+
* ARROWS..............CSS arrows
|
97
98
|
* SPRITE..............Generic spriting element
|
98
99
|
* ICON-TEXT...........Icon and text couplings
|
99
100
|
* BUTTONS.............
|
@@ -83,3 +83,146 @@
|
|
83
83
|
overflow:hidden;
|
84
84
|
text-overflow:ellipsis;
|
85
85
|
}
|
86
|
+
|
87
|
+
|
88
|
+
/**
|
89
|
+
* CSS arrows!!! But... before you read on, you might want to grab a coffee...
|
90
|
+
*
|
91
|
+
* This mixin creates a CSS arrow on a given element. We can have the arrow
|
92
|
+
* appear in one of 12 locations, thus:
|
93
|
+
*
|
94
|
+
* 01 02 03
|
95
|
+
* +------------------+
|
96
|
+
* 12 | | 04
|
97
|
+
* | |
|
98
|
+
* 11 | | 05
|
99
|
+
* | |
|
100
|
+
* 10 | | 06
|
101
|
+
* +------------------+
|
102
|
+
* 09 08 07
|
103
|
+
*
|
104
|
+
* You pass this position in along with a desired arrow color and optional
|
105
|
+
* border color, for example:
|
106
|
+
*
|
107
|
+
* `@include arrow(top, left, red)`
|
108
|
+
*
|
109
|
+
* for just a single, red arrow, or:
|
110
|
+
*
|
111
|
+
* `@include arrow(bottom, center, red, black)`
|
112
|
+
*
|
113
|
+
* which will create a red triangle with a black border which sits at the bottom
|
114
|
+
* center of the element. Call the mixin thus:
|
115
|
+
*
|
116
|
+
.foo{
|
117
|
+
background-color:#BADA55;
|
118
|
+
border:1px solid #ACE;
|
119
|
+
@include arrow(top, left, #BADA55, #ACE);
|
120
|
+
}
|
121
|
+
*
|
122
|
+
*/
|
123
|
+
@mixin arrow($arrow-edge, $arrow-location, $arrow-color, $border-color: $arrow-color){
|
124
|
+
|
125
|
+
@if $arrow-edge == top{
|
126
|
+
|
127
|
+
@extend %arrow--top;
|
128
|
+
|
129
|
+
&:before{
|
130
|
+
border-bottom-color:$border-color;
|
131
|
+
}
|
132
|
+
|
133
|
+
&:after{
|
134
|
+
border-bottom-color:$arrow-color;
|
135
|
+
}
|
136
|
+
|
137
|
+
@if $arrow-location == left{
|
138
|
+
@extend %arrow--left;
|
139
|
+
}
|
140
|
+
|
141
|
+
@if $arrow-location == center{
|
142
|
+
@extend %arrow--center;
|
143
|
+
}
|
144
|
+
|
145
|
+
@if $arrow-location == right{
|
146
|
+
@extend %arrow--right;
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
@if $arrow-edge == right{
|
152
|
+
|
153
|
+
@extend %arrow--far;
|
154
|
+
|
155
|
+
&:before{
|
156
|
+
border-left-color:$border-color;
|
157
|
+
}
|
158
|
+
|
159
|
+
&:after{
|
160
|
+
border-left-color:$arrow-color;
|
161
|
+
}
|
162
|
+
|
163
|
+
@if $arrow-location == top{
|
164
|
+
@extend %arrow--upper;
|
165
|
+
}
|
166
|
+
|
167
|
+
@if $arrow-location == center{
|
168
|
+
@extend %arrow--middle;
|
169
|
+
}
|
170
|
+
|
171
|
+
@if $arrow-location == bottom{
|
172
|
+
@extend %arrow--lower;
|
173
|
+
}
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
@if $arrow-edge == bottom{
|
178
|
+
|
179
|
+
@extend %arrow--bottom;
|
180
|
+
|
181
|
+
&:before{
|
182
|
+
border-top-color:$border-color;
|
183
|
+
}
|
184
|
+
|
185
|
+
&:after{
|
186
|
+
border-top-color:$arrow-color;
|
187
|
+
}
|
188
|
+
|
189
|
+
@if $arrow-location == left{
|
190
|
+
@extend %arrow--left;
|
191
|
+
}
|
192
|
+
|
193
|
+
@if $arrow-location == center{
|
194
|
+
@extend %arrow--center;
|
195
|
+
}
|
196
|
+
|
197
|
+
@if $arrow-location == right{
|
198
|
+
@extend %arrow--right;
|
199
|
+
}
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
@if $arrow-edge == left{
|
204
|
+
@extend %arrow--near;
|
205
|
+
|
206
|
+
&:before{
|
207
|
+
border-right-color:$border-color;
|
208
|
+
}
|
209
|
+
|
210
|
+
&:after{
|
211
|
+
border-right-color:$arrow-color;
|
212
|
+
}
|
213
|
+
|
214
|
+
@if $arrow-location == top{
|
215
|
+
@extend %arrow--upper;
|
216
|
+
}
|
217
|
+
|
218
|
+
@if $arrow-location == center{
|
219
|
+
@extend %arrow--middle;
|
220
|
+
}
|
221
|
+
|
222
|
+
@if $arrow-location == bottom{
|
223
|
+
@extend %arrow--lower;
|
224
|
+
}
|
225
|
+
|
226
|
+
}
|
227
|
+
|
228
|
+
}
|
@@ -0,0 +1,143 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$ARROWS
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* It is a common design treatment to give an element a triangular points-out
|
6
|
+
* arrow, we typically build these with CSS. These following classes allow us to
|
7
|
+
* generate these arbitrarily with a mixin, `@arrow()`.
|
8
|
+
*/
|
9
|
+
|
10
|
+
$arrow-size: $half-spacing-unit;
|
11
|
+
$arrow-border: 1;
|
12
|
+
$border: $arrow-size;
|
13
|
+
$arrow: $arrow-size - $arrow-border;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Forms the basis for any/all CSS arrows.
|
17
|
+
*/
|
18
|
+
%arrow{
|
19
|
+
position:relative;
|
20
|
+
|
21
|
+
&:before,
|
22
|
+
&:after{
|
23
|
+
content:"";
|
24
|
+
position:absolute;
|
25
|
+
border-collapse:separate;
|
26
|
+
}
|
27
|
+
&:before{
|
28
|
+
border:$border +px solid transparent;
|
29
|
+
}
|
30
|
+
&:after{
|
31
|
+
border:$arrow +px solid transparent;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Define individual edges so we can combine what we need, when we need.
|
38
|
+
*/
|
39
|
+
%arrow--top{
|
40
|
+
@extend %arrow;
|
41
|
+
|
42
|
+
&:before,
|
43
|
+
&:after{
|
44
|
+
bottom:100%;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
%arrow--upper{
|
49
|
+
@extend %arrow;
|
50
|
+
|
51
|
+
&:before{
|
52
|
+
top:$arrow +px;
|
53
|
+
}
|
54
|
+
&:after{
|
55
|
+
top:$border +px;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
%arrow--middle{
|
60
|
+
@extend %arrow;
|
61
|
+
|
62
|
+
&:before,
|
63
|
+
&:after{
|
64
|
+
top:50%;
|
65
|
+
margin-top:-($border +px);
|
66
|
+
}
|
67
|
+
&:after{
|
68
|
+
margin-top:-($arrow +px);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
%arrow--lower{
|
73
|
+
@extend %arrow;
|
74
|
+
|
75
|
+
&:before{
|
76
|
+
bottom:$arrow +px;
|
77
|
+
}
|
78
|
+
&:after{
|
79
|
+
bottom:$border +px;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
%arrow--bottom{
|
84
|
+
@extend %arrow;
|
85
|
+
|
86
|
+
&:before,
|
87
|
+
&:after{
|
88
|
+
top:100%;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
%arrow--near{
|
93
|
+
@extend %arrow;
|
94
|
+
|
95
|
+
&:before,
|
96
|
+
&:after{
|
97
|
+
right:100%;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
%arrow--left{
|
102
|
+
@extend %arrow;
|
103
|
+
|
104
|
+
&:before{
|
105
|
+
left:$arrow +px;
|
106
|
+
}
|
107
|
+
&:after{
|
108
|
+
left:$border +px;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
%arrow--center{
|
113
|
+
@extend %arrow;
|
114
|
+
|
115
|
+
&:before,
|
116
|
+
&:after{
|
117
|
+
left:50%;
|
118
|
+
margin-left:-($border +px);
|
119
|
+
}
|
120
|
+
&:after{
|
121
|
+
margin-left:-($arrow +px);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
%arrow--right{
|
126
|
+
@extend %arrow;
|
127
|
+
|
128
|
+
&:before{
|
129
|
+
right:$arrow +px;
|
130
|
+
}
|
131
|
+
&:after{
|
132
|
+
right:$border +px;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
%arrow--far{
|
137
|
+
@extend %arrow;
|
138
|
+
|
139
|
+
&:before,
|
140
|
+
&:after{
|
141
|
+
left:100%;
|
142
|
+
}
|
143
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-inuit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- stylesheets/partials/generic/_reset.scss
|
79
79
|
- stylesheets/partials/generic/_shared.scss
|
80
80
|
- stylesheets/partials/generic/_widths.scss
|
81
|
+
- stylesheets/partials/objects/_arrows.scss
|
81
82
|
- stylesheets/partials/objects/_block-list.scss
|
82
83
|
- stylesheets/partials/objects/_breadcrumb.scss
|
83
84
|
- stylesheets/partials/objects/_buttons.scss
|