-
Notifications
You must be signed in to change notification settings - Fork 3
/
_ie.scss
191 lines (136 loc) · 5.45 KB
/
_ie.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
// stylelint-disable declaration-no-important, selector-max-universal
// =============================================================================
// ^IE hacks
// =============================================================================
//
// Making world a bit better for IE
// Usually you don't want to write anything here
// -----------------------------------------------------------------------------
// Imports
// -----------------------------------------------------------------------------
//
// @note We need to declare here imports too, since it's standalone file
// -----------------------------------------------------------------------------
// Tools: functions and mixins
// -----------------------------------------------------------------------------
@import './tools/index';
// -----------------------------------------------------------------------------
// Default options, styles, colors etc
// -----------------------------------------------------------------------------
@import 'settings.defaults/typography';
@import 'settings.defaults/framework';
@import 'settings.defaults/themes';
@import 'settings.defaults/assets';
@import 'settings.defaults/options';
@import 'settings.defaults/responsive';
// -----------------------------------------------------------------------------
// Objects
// -----------------------------------------------------------------------------
@import './objects/clearfix';
// -----------------------------------------------------------------------------
// Grid legacy hacks
// -----------------------------------------------------------------------------
//
// @legacy
//
// 1. Serving non-flex grids for IE<10
// 2. Used display model `inline-block` yeilds unwanted whitespaces
// which we have to removed with quite cruel method
.#{$ekzo-o-ns}grid { letter-spacing: -.31em; }
.#{$ekzo-o-ns}grid__item {
vertical-align: top;
display: inline-block; // 1
letter-spacing: normal; // 2
}
// -----------------------------------------------------------------------------
// Flex aligment hacks
// -----------------------------------------------------------------------------
// When used with `.o-grid`, try to mimic flex
// behavior as close as possible
@mixin ekzo-flex-helpers ($prefix: $ekzo-h-ns, $postfix: '') {
// -----
// Main axis aligment
.#{$prefix}flex--nowrap#{$postfix} {
display: table;
> * { display: table-cell; }
}
.#{$prefix}flex-x--start#{$postfix} { text-align: left !important; }
.#{$prefix}flex-x--center#{$postfix} {
text-align: center !important;
> * { text-align: left; }
}
.#{$prefix}flex-x--end#{$postfix} {
text-align: right !important;
> * { text-align: left; }
}
.#{$prefix}flex-x--between#{$postfix},
.#{$prefix}flex-x--around#{$postfix} {
text-align: justify !important;
> * { text-align: left; }
}
// -----
// Cross axis aligment
.#{$prefix}flex-y--top#{$postfix} { > * { vertical-align: top !important; } }
.#{$prefix}flex-y--center#{$postfix} { > * { vertical-align: middle !important; } }
.#{$prefix}flex-y--end#{$postfix} { > * { vertical-align: bottom !important; } }
.#{$prefix}flex-y--baseline#{$postfix} { > * { vertical-align: baseline !important; } }
.#{$prefix}flex__item--start#{$postfix} { vertical-align: top !important; }
.#{$prefix}flex__item--center#{$postfix} { vertical-align: middle !important; }
.#{$prefix}flex__item--end#{$postfix} { vertical-align: bottom !important; }
.#{$prefix}flex__item--baseline#{$postfix} { vertical-align: baseline !important; }
}
// -----------------------------------------------------------------------------
// Call
// -----------------------------------------------------------------------------
@include ekzo-for-each-breakpoint($matches: $ekzo-responsive-flex-helpers-breakpoints, $include-self: true) {
@include ekzo-flex-helpers($postfix: ekzo-temp());
}
// =============================================================================
// ^MEDIA
// =============================================================================
// Fallback to float-based media object, since IE8-9 doesn't support flexbox
.#{$ekzo-o-ns}media { @extend %#{$ekzo-o-ns}clearfix; }
.#{$ekzo-o-ns}media__aside {
float: left;
display: block;
}
.#{$ekzo-o-ns}media__content {
display: block;
overflow: hidden;
}
// -----------------------------------------------------------------------------
// Reversed version
// -----------------------------------------------------------------------------
.#{$ekzo-o-ns}media--rev {
.#{$ekzo-o-ns}media__aside { float: right; }
}
// =============================================================================
// ^NAV
// =============================================================================
// ----
// Extends `.nav` and throws the list into vertical mode, e.g.:
.#{$ekzo-o-ns}nav--stacked {
> a {
float: left;
clear: both;
}
> li { display: list-item; }
}
// -----------------------------------------------------------------------------
// Packed nav
// -----------------------------------------------------------------------------
.#{$ekzo-o-ns}nav--pack {
display: table;
width: 100%; // Fill all available space.
> li,
> a,
> .#{$ekzo-o-ns}nav__item { display: table-cell; }
}
.#{$ekzo-o-ns}nav--fixed-pack {
display: table;
table-layout: fixed;
width: 100%; // Fill all available space.
> li,
> a,
> .#{$ekzo-o-ns}nav__item { display: table-cell; }
}