-
Notifications
You must be signed in to change notification settings - Fork 11
/
_orbit.scss
193 lines (156 loc) · 4.33 KB
/
_orbit.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group orbit
////
/// Default color for Orbit's bullets.
/// @type Color
$orbit-bullet-background: $medium-gray !default;
/// Default active color for Orbit's bullets.
/// @type Color
$orbit-bullet-background-active: $dark-gray !default;
/// Default diameter for Orbit's bullets.
/// @type Number
$orbit-bullet-diameter: 1.2rem !default;
/// Default margin between Orbit's bullets.
/// @type Number
$orbit-bullet-margin: 0.1rem !default;
/// Default distance from slide region for Orbit's bullets.
/// @type Number
$orbit-bullet-margin-top: 0.8rem !default;
/// Default bottom margin from Orbit's bullets to whatever content may lurk below it.
/// @type Number
$orbit-bullet-margin-bottom: 0.8rem !default;
/// Default background color for Orbit's caption.
/// @type Color
$orbit-caption-background: rgba($black, 0.5) !default;
/// Default padding for Orbit's caption.
/// @type Number
$orbit-caption-padding: 1rem !default;
/// Default background color for Orbit's controls when hovered.
/// @type Color
$orbit-control-background-hover: rgba($black, 0.5) !default;
/// Default padding for Orbit's controls.
/// @type Number
$orbit-control-padding: 1rem !default;
/// Default z-index for Orbit's controls.
/// @type Number
$orbit-control-zindex: 10 !default;
/// Adds styles for the outer Orbit wrapper. These styles are used on the `.orbit` class.
@mixin orbit-wrapper {
position: relative;
}
/// Adds styles for the inner Orbit slide container. These styles are used on the `.orbit-container` class.
@mixin orbit-container {
position: relative;
margin: 0;
overflow: hidden;
list-style: none;
}
/// Adds styles for the individual slides of an Orbit slider. These styles are used on the `.orbit-slide` class.
@mixin orbit-slide {
width: 100%;
max-height: 100%;
&.no-motionui {
&.is-active {
top: 0;
left: 0;
}
}
}
@mixin orbit-figure {
margin: 0;
}
@mixin orbit-image {
margin: 0;
width: 100%;
max-width: 100%;
}
/// Adds styles for an orbit slide caption. These styles are used on the `.orbit-caption` class.
@mixin orbit-caption {
position: absolute;
bottom: 0;
width: 100%;
padding: $orbit-caption-padding;
margin-bottom: 0;
color: foreground($orbit-caption-background);
background-color: $orbit-caption-background;
}
/// Adds base styles for the next/previous buttons in an Orbit slider. These styles are shared between the `.orbit-next` and `.orbit-previous` classes in the default CSS.
@mixin orbit-control {
@include disable-mouse-outline;
@include vertical-center;
z-index: $orbit-control-zindex;
padding: $orbit-control-padding;
color: $white;
&:hover,
&:active,
&:focus {
background-color: $orbit-control-background-hover;
}
}
/// Adds styles for the Orbit previous button. These styles are used on the `.orbit-previous` class.
@mixin orbit-previous {
#{$global-left}: 0;
}
/// Adds styles for the Orbit next button. These styles are used on the `.orbit-next` class.
@mixin orbit-next {
#{$global-left}: auto;
#{$global-right}: 0;
}
/// Adds styles for a container of Orbit bullets. /// Adds styles for the Orbit previous button. These styles are used on the `.orbit-bullets` class.
@mixin orbit-bullets {
@include disable-mouse-outline;
position: relative;
margin-top: $orbit-bullet-margin-top;
margin-bottom: $orbit-bullet-margin-bottom;
text-align: center;
button {
width: $orbit-bullet-diameter;
height: $orbit-bullet-diameter;
margin: $orbit-bullet-margin;
background-color: $orbit-bullet-background;
border-radius: 50%;
&:hover {
background-color: $orbit-bullet-background-active;
}
&.is-active {
background-color: $orbit-bullet-background-active;
}
}
}
@mixin foundation-orbit {
.orbit {
@include orbit-wrapper;
}
.orbit-container {
@include orbit-container;
}
.orbit-slide {
@include orbit-slide;
}
.orbit-figure {
@include orbit-figure;
}
.orbit-image {
@include orbit-image;
}
.orbit-caption {
@include orbit-caption;
}
%orbit-control {
@include orbit-control;
}
.orbit-previous {
@extend %orbit-control;
@include orbit-previous;
}
.orbit-next {
@extend %orbit-control;
@include orbit-next;
}
.orbit-bullets {
@include orbit-bullets;
}
}