jekyll-text-theme-fork 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +235 -0
- data/LICENSE +21 -0
- data/README.md +89 -0
- data/_data/authors.yml +0 -0
- data/_data/licenses.yml +16 -0
- data/_data/locale.yml +169 -0
- data/_data/navigation.yml +52 -0
- data/_data/variables.yml +64 -0
- data/_includes/analytics-providers/custom.html +3 -0
- data/_includes/analytics-providers/google.html +14 -0
- data/_includes/analytics.html +7 -0
- data/_includes/article/footer/author-profile.html +47 -0
- data/_includes/article/footer/custom.html +3 -0
- data/_includes/article/footer/license.html +14 -0
- data/_includes/article/footer/subscribe.html +6 -0
- data/_includes/article/top/custom.html +3 -0
- data/_includes/article-footer.html +55 -0
- data/_includes/article-header.html +49 -0
- data/_includes/article-info.html +96 -0
- data/_includes/article-list.html +144 -0
- data/_includes/article-section-navigator.html +54 -0
- data/_includes/aside/toc.html +1 -0
- data/_includes/author-links.html +120 -0
- data/_includes/comments-providers/custom.html +3 -0
- data/_includes/comments-providers/disqus.html +22 -0
- data/_includes/comments-providers/gitalk.html +39 -0
- data/_includes/comments-providers/valine.html +46 -0
- data/_includes/comments.html +11 -0
- data/_includes/extensions/bilibili.html +5 -0
- data/_includes/extensions/codepen.html +4 -0
- data/_includes/extensions/netease-cloud-music.html +4 -0
- data/_includes/extensions/slideshare.html +6 -0
- data/_includes/extensions/soundcloud.html +4 -0
- data/_includes/extensions/ted.html +5 -0
- data/_includes/extensions/youtube.html +4 -0
- data/_includes/footer.html +37 -0
- data/_includes/head/custom.html +3 -0
- data/_includes/head/favicon.html +26 -0
- data/_includes/head.html +24 -0
- data/_includes/header.html +44 -0
- data/_includes/main/bottom/custom.html +3 -0
- data/_includes/main/top/custom.html +3 -0
- data/_includes/markdown-enhancements/chart.html +15 -0
- data/_includes/markdown-enhancements/mathjax.html +17 -0
- data/_includes/markdown-enhancements/mermaid.html +10 -0
- data/_includes/markdown-enhancements.html +17 -0
- data/_includes/pageview-providers/custom/home.html +3 -0
- data/_includes/pageview-providers/custom/post.html +3 -0
- data/_includes/pageview-providers/leancloud/home.html +35 -0
- data/_includes/pageview-providers/leancloud/leancloud.js +72 -0
- data/_includes/pageview-providers/leancloud/post.html +31 -0
- data/_includes/pageview.html +29 -0
- data/_includes/paginator.html +98 -0
- data/_includes/scripts/archieve.js +135 -0
- data/_includes/scripts/article.js +24 -0
- data/_includes/scripts/aside/affix.js +26 -0
- data/_includes/scripts/aside/toc.js +35 -0
- data/_includes/scripts/common.js +7 -0
- data/_includes/scripts/components/lightbox.js +49 -0
- data/_includes/scripts/components/search.js +86 -0
- data/_includes/scripts/components/sidebar.js +30 -0
- data/_includes/scripts/home.js +3 -0
- data/_includes/scripts/lib/affix.js +111 -0
- data/_includes/scripts/lib/gallery.js +192 -0
- data/_includes/scripts/lib/lazyload.js +143 -0
- data/_includes/scripts/lib/modal.js +64 -0
- data/_includes/scripts/lib/scroll-to.js +13 -0
- data/_includes/scripts/lib/swiper.js +203 -0
- data/_includes/scripts/lib/throttle.js +28 -0
- data/_includes/scripts/lib/toc.js +107 -0
- data/_includes/scripts/page.js +3 -0
- data/_includes/scripts/utils/imagesLoad.js +28 -0
- data/_includes/scripts/utils/utils.js +39 -0
- data/_includes/scripts/variables.html +35 -0
- data/_includes/search-providers/custom/search.html +3 -0
- data/_includes/search-providers/default/search-data.js +14 -0
- data/_includes/search-providers/default/search.html +18 -0
- data/_includes/search-providers/default/search.js +112 -0
- data/_includes/search-providers/google-custom-search-engine/search.html +21 -0
- data/_includes/search-providers/google-custom-search-engine/search.js +33 -0
- data/_includes/search.html +20 -0
- data/_includes/sharing-providers/addthis.html +9 -0
- data/_includes/sharing-providers/addtoany.html +10 -0
- data/_includes/sharing-providers/custom.html +3 -0
- data/_includes/sharing.html +7 -0
- data/_includes/sidebar/toc.html +25 -0
- data/_includes/snippets/assign.html +9 -0
- data/_includes/snippets/get-article-title.html +11 -0
- data/_includes/snippets/get-lang.html +6 -0
- data/_includes/snippets/get-locale-string.html +12 -0
- data/_includes/snippets/get-nav-url.html +8 -0
- data/_includes/snippets/get-sources.html +2 -0
- data/_includes/snippets/get-string-from-locale-config.html +7 -0
- data/_includes/snippets/is_collection.html +6 -0
- data/_includes/snippets/page-url.html +2 -0
- data/_includes/snippets/prepend-baseurl.html +4 -0
- data/_includes/snippets/prepend-path.html +1 -0
- data/_includes/svg/icon/social/behance.svg +3 -0
- data/_includes/svg/icon/social/douban.svg +5 -0
- data/_includes/svg/icon/social/facebook.svg +3 -0
- data/_includes/svg/icon/social/flicker.svg +5 -0
- data/_includes/svg/icon/social/github.svg +3 -0
- data/_includes/svg/icon/social/googleplus.svg +3 -0
- data/_includes/svg/icon/social/linkedin.svg +3 -0
- data/_includes/svg/icon/social/mail.svg +6 -0
- data/_includes/svg/icon/social/medium.svg +3 -0
- data/_includes/svg/icon/social/npm.svg +9 -0
- data/_includes/svg/icon/social/pinterest.svg +3 -0
- data/_includes/svg/icon/social/qq.svg +3 -0
- data/_includes/svg/icon/social/telegram.svg +4 -0
- data/_includes/svg/icon/social/twitter.svg +3 -0
- data/_includes/svg/icon/social/weibo.svg +6 -0
- data/_includes/svg/icon/social/weixin.svg +3 -0
- data/_includes/svg/icon/social/zhihu.svg +3 -0
- data/_includes/svg/logo.svg +8 -0
- data/_includes/tags.html +52 -0
- data/_layouts/404.html +13 -0
- data/_layouts/archive.html +40 -0
- data/_layouts/article.html +29 -0
- data/_layouts/articles.html +89 -0
- data/_layouts/base.html +25 -0
- data/_layouts/home.html +43 -0
- data/_layouts/landing.html +178 -0
- data/_layouts/none.html +1 -0
- data/_layouts/page.html +270 -0
- data/_sass/additional/_alert.scss +29 -0
- data/_sass/additional/_photo-frame.scss +17 -0
- data/_sass/additional/_tag.scss +21 -0
- data/_sass/animate/_fade-in-down.scss +10 -0
- data/_sass/animate/_fade-in-up.scss +10 -0
- data/_sass/animate/_fade-in.scss +8 -0
- data/_sass/common/_classes.scss +24 -0
- data/_sass/common/_function.scss +15 -0
- data/_sass/common/_print.scss +20 -0
- data/_sass/common/_reset.scss +174 -0
- data/_sass/common/_variables.scss +150 -0
- data/_sass/common/classes/_animation.scss +13 -0
- data/_sass/common/classes/_clearfix.scss +19 -0
- data/_sass/common/classes/_clickable.scss +159 -0
- data/_sass/common/classes/_display.scss +13 -0
- data/_sass/common/classes/_flex.scss +394 -0
- data/_sass/common/classes/_grid.scss +80 -0
- data/_sass/common/classes/_horizontal-rules.scss +14 -0
- data/_sass/common/classes/_link.scss +12 -0
- data/_sass/common/classes/_media.scss +17 -0
- data/_sass/common/classes/_overflow.scss +26 -0
- data/_sass/common/classes/_pseudo.scss +33 -0
- data/_sass/common/classes/_shadow.scss +22 -0
- data/_sass/common/classes/_spacing.scss +81 -0
- data/_sass/common/classes/_split-line.scss +24 -0
- data/_sass/common/classes/_text.scss +37 -0
- data/_sass/common/classes/_transform.scss +4 -0
- data/_sass/common/classes/_transition.scss +4 -0
- data/_sass/common/classes/_user-select.scss +6 -0
- data/_sass/common/components/_button.scss +163 -0
- data/_sass/common/components/_card.scss +103 -0
- data/_sass/common/components/_gallery.scss +21 -0
- data/_sass/common/components/_hero.scss +70 -0
- data/_sass/common/components/_image.scss +19 -0
- data/_sass/common/components/_item.scss +100 -0
- data/_sass/common/components/_menu.scss +67 -0
- data/_sass/common/components/_modal.scss +39 -0
- data/_sass/common/components/_swiper.scss +48 -0
- data/_sass/common/components/_toc.scss +124 -0
- data/_sass/components/_article-content.scss +221 -0
- data/_sass/components/_article-footer.scss +17 -0
- data/_sass/components/_article-header.scss +50 -0
- data/_sass/components/_article-info.scss +25 -0
- data/_sass/components/_article-list.scss +18 -0
- data/_sass/components/_author-links.scss +43 -0
- data/_sass/components/_author-profile.scss +26 -0
- data/_sass/components/_extensions.scss +35 -0
- data/_sass/components/_footer.scss +33 -0
- data/_sass/components/_header.scss +123 -0
- data/_sass/components/_lightbox.scss +7 -0
- data/_sass/components/_main.scss +28 -0
- data/_sass/components/_search.scss +186 -0
- data/_sass/components/_tags.scss +24 -0
- data/_sass/custom.scss +3 -0
- data/_sass/layout/_404.scss +14 -0
- data/_sass/layout/_archive.scss +5 -0
- data/_sass/layout/_article.scss +29 -0
- data/_sass/layout/_articles.scss +17 -0
- data/_sass/layout/_base.scss +6 -0
- data/_sass/layout/_home.scss +15 -0
- data/_sass/layout/_landing.scss +23 -0
- data/_sass/layout/_page.scss +165 -0
- data/_sass/skins/_chocolate.scss +74 -0
- data/_sass/skins/_dark.scss +74 -0
- data/_sass/skins/_default.scss +74 -0
- data/_sass/skins/_forest.scss +74 -0
- data/_sass/skins/_ocean.scss +74 -0
- data/_sass/skins/_orange.scss +74 -0
- data/_sass/skins/highlight/_default.scss +0 -0
- data/_sass/skins/highlight/_tomorrow-night-blue.scss +2 -0
- data/_sass/skins/highlight/_tomorrow-night-bright.scss +2 -0
- data/_sass/skins/highlight/_tomorrow-night-eighties.scss +2 -0
- data/_sass/skins/highlight/_tomorrow-night.scss +2 -0
- data/_sass/skins/highlight/_tomorrow.scss +2 -0
- data/_sass/skins/highlight/tomorrow/_default.scss +10 -0
- data/_sass/skins/highlight/tomorrow/_highlight.scss +74 -0
- data/_sass/skins/highlight/tomorrow/_night-blue.scss +10 -0
- data/_sass/skins/highlight/tomorrow/_night-bright.scss +10 -0
- data/_sass/skins/highlight/tomorrow/_night-eighties.scss +10 -0
- data/_sass/skins/highlight/tomorrow/_night.scss +10 -0
- data/assets/android-chrome-192x192.png +0 -0
- data/assets/android-chrome-512x512.png +0 -0
- data/assets/apple-touch-icon.png +0 -0
- data/assets/browserconfig.xml +9 -0
- data/assets/css/main.scss +74 -0
- data/assets/favicon-16x16.png +0 -0
- data/assets/favicon-32x32.png +0 -0
- data/assets/favicon.ico +0 -0
- data/assets/images/logo/logo.svg +8 -0
- data/assets/mstile-144x144.png +0 -0
- data/assets/mstile-150x150.png +0 -0
- data/assets/mstile-310x150.png +0 -0
- data/assets/mstile-310x310.png +0 -0
- data/assets/mstile-70x70.png +0 -0
- data/assets/safari-pinned-tab.svg +38 -0
- data/assets/search.js +3 -0
- data/assets/site.webmanifest +19 -0
- metadata +371 -0
@@ -0,0 +1,394 @@
|
|
1
|
+
// Flexbox Mixins
|
2
|
+
// http://philipwalton.github.io/solved-by-flexbox/
|
3
|
+
// https://github.com/philipwalton/solved-by-flexbox
|
4
|
+
//
|
5
|
+
// Copyright (c) 2013 Brian Franco
|
6
|
+
//
|
7
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
// copy of this software and associated documentation files (the
|
9
|
+
// "Software"), to deal in the Software without restriction, including
|
10
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
11
|
+
// distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
+
// permit persons to whom the Software is furnished to do so, subject to
|
13
|
+
// the following conditions:
|
14
|
+
// The above copyright notice and this permission notice shall be included
|
15
|
+
// in all copies or substantial portions of the Software.
|
16
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
17
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
//
|
24
|
+
// This is a set of mixins for those who want to mess around with flexbox
|
25
|
+
// using the native support of current browsers. For full support table
|
26
|
+
// check: http://caniuse.com/flexbox
|
27
|
+
//
|
28
|
+
// Basically this will use:
|
29
|
+
//
|
30
|
+
// * Fallback, old syntax (IE10, mobile webkit browsers - no wrapping)
|
31
|
+
// * Final standards syntax (FF, Safari, Chrome, IE11, Opera)
|
32
|
+
//
|
33
|
+
// This was inspired by:
|
34
|
+
//
|
35
|
+
// * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/
|
36
|
+
//
|
37
|
+
// With help from:
|
38
|
+
//
|
39
|
+
// * http://w3.org/tr/css3-flexbox/
|
40
|
+
// * http://the-echoplex.net/flexyboxes/
|
41
|
+
// * http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx
|
42
|
+
// * http://css-tricks.com/using-flexbox/
|
43
|
+
// * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/
|
44
|
+
// * https://developer.mozilla.org/en-us/docs/web/guide/css/flexible_boxes
|
45
|
+
|
46
|
+
//----------------------------------------------------------------------
|
47
|
+
|
48
|
+
// Flexbox Containers
|
49
|
+
//
|
50
|
+
// The 'flex' value causes an element to generate a block-level flex
|
51
|
+
// container box.
|
52
|
+
//
|
53
|
+
// The 'inline-flex' value causes an element to generate a inline-level
|
54
|
+
// flex container box.
|
55
|
+
//
|
56
|
+
// display: flex | inline-flex
|
57
|
+
//
|
58
|
+
// http://w3.org/tr/css3-flexbox/#flex-containers
|
59
|
+
//
|
60
|
+
// (Placeholder selectors for each type, for those who rather @extend)
|
61
|
+
|
62
|
+
@mixin flexbox {
|
63
|
+
display: -webkit-box;
|
64
|
+
display: -webkit-flex;
|
65
|
+
display: -moz-flex;
|
66
|
+
display: -ms-flexbox;
|
67
|
+
display: flex;
|
68
|
+
}
|
69
|
+
|
70
|
+
%flexbox { @include flexbox; }
|
71
|
+
|
72
|
+
//----------------------------------
|
73
|
+
|
74
|
+
@mixin inline-flex {
|
75
|
+
display: -webkit-inline-box;
|
76
|
+
display: -webkit-inline-flex;
|
77
|
+
display: -moz-inline-flex;
|
78
|
+
display: -ms-inline-flexbox;
|
79
|
+
display: inline-flex;
|
80
|
+
}
|
81
|
+
|
82
|
+
%inline-flex { @include inline-flex; }
|
83
|
+
|
84
|
+
//----------------------------------------------------------------------
|
85
|
+
|
86
|
+
// Flexbox Direction
|
87
|
+
//
|
88
|
+
// The 'flex-direction' property specifies how flex items are placed in
|
89
|
+
// the flex container, by setting the direction of the flex container's
|
90
|
+
// main axis. This determines the direction that flex items are laid out in.
|
91
|
+
//
|
92
|
+
// Values: row | row-reverse | column | column-reverse
|
93
|
+
// Default: row
|
94
|
+
//
|
95
|
+
// http://w3.org/tr/css3-flexbox/#flex-direction-property
|
96
|
+
|
97
|
+
@mixin flex-direction($value: row) {
|
98
|
+
@if $value == row-reverse {
|
99
|
+
-webkit-box-direction: reverse;
|
100
|
+
-webkit-box-orient: horizontal;
|
101
|
+
} @else if $value == column {
|
102
|
+
-webkit-box-direction: normal;
|
103
|
+
-webkit-box-orient: vertical;
|
104
|
+
} @else if $value == column-reverse {
|
105
|
+
-webkit-box-direction: reverse;
|
106
|
+
-webkit-box-orient: vertical;
|
107
|
+
} @else {
|
108
|
+
-webkit-box-direction: normal;
|
109
|
+
-webkit-box-orient: horizontal;
|
110
|
+
}
|
111
|
+
-webkit-flex-direction: $value;
|
112
|
+
-moz-flex-direction: $value;
|
113
|
+
-ms-flex-direction: $value;
|
114
|
+
flex-direction: $value;
|
115
|
+
}
|
116
|
+
// Shorter version:
|
117
|
+
@mixin flex-dir($args...) { @include flex-direction($args...); }
|
118
|
+
|
119
|
+
//----------------------------------------------------------------------
|
120
|
+
|
121
|
+
// Flexbox Wrap
|
122
|
+
//
|
123
|
+
// The 'flex-wrap' property controls whether the flex container is single-line
|
124
|
+
// or multi-line, and the direction of the cross-axis, which determines
|
125
|
+
// the direction new lines are stacked in.
|
126
|
+
//
|
127
|
+
// Values: nowrap | wrap | wrap-reverse
|
128
|
+
// Default: nowrap
|
129
|
+
//
|
130
|
+
// http://w3.org/tr/css3-flexbox/#flex-wrap-property
|
131
|
+
|
132
|
+
@mixin flex-wrap($value: nowrap) {
|
133
|
+
// No Webkit Box fallback.
|
134
|
+
-webkit-flex-wrap: $value;
|
135
|
+
-moz-flex-wrap: $value;
|
136
|
+
@if $value == nowrap {
|
137
|
+
-ms-flex-wrap: none;
|
138
|
+
} @else {
|
139
|
+
-ms-flex-wrap: $value;
|
140
|
+
}
|
141
|
+
flex-wrap: $value;
|
142
|
+
}
|
143
|
+
|
144
|
+
//----------------------------------------------------------------------
|
145
|
+
|
146
|
+
// Flexbox Flow (shorthand)
|
147
|
+
//
|
148
|
+
// The 'flex-flow' property is a shorthand for setting the 'flex-direction'
|
149
|
+
// and 'flex-wrap' properties, which together define the flex container's
|
150
|
+
// main and cross axes.
|
151
|
+
//
|
152
|
+
// Values: <flex-direction> | <flex-wrap>
|
153
|
+
// Default: row nowrap
|
154
|
+
//
|
155
|
+
// http://w3.org/tr/css3-flexbox/#flex-flow-property
|
156
|
+
|
157
|
+
@mixin flex-flow($values: (row nowrap)) {
|
158
|
+
// No Webkit Box fallback.
|
159
|
+
-webkit-flex-flow: $values;
|
160
|
+
-moz-flex-flow: $values;
|
161
|
+
-ms-flex-flow: $values;
|
162
|
+
flex-flow: $values;
|
163
|
+
}
|
164
|
+
|
165
|
+
//----------------------------------------------------------------------
|
166
|
+
|
167
|
+
// Flexbox Order
|
168
|
+
//
|
169
|
+
// The 'order' property controls the order in which flex items appear within
|
170
|
+
// their flex container, by assigning them to ordinal groups.
|
171
|
+
//
|
172
|
+
// Default: 0
|
173
|
+
//
|
174
|
+
// http://w3.org/tr/css3-flexbox/#order-property
|
175
|
+
|
176
|
+
@mixin order($int: 0) {
|
177
|
+
-ms-flex-order: $int;
|
178
|
+
-webkit-order: $int;
|
179
|
+
-moz-order: $int;
|
180
|
+
order: $int;
|
181
|
+
-webkit-box-ordinal-group: $int + 1;
|
182
|
+
}
|
183
|
+
|
184
|
+
//----------------------------------------------------------------------
|
185
|
+
|
186
|
+
// Flexbox Grow
|
187
|
+
//
|
188
|
+
// The 'flex-grow' property sets the flex grow factor. Negative numbers
|
189
|
+
// are invalid.
|
190
|
+
//
|
191
|
+
// Default: 0
|
192
|
+
//
|
193
|
+
// http://w3.org/tr/css3-flexbox/#flex-grow-property
|
194
|
+
|
195
|
+
@mixin flex-grow($int: 0) {
|
196
|
+
-webkit-box-flex: $int;
|
197
|
+
-webkit-flex-grow: $int;
|
198
|
+
-moz-flex-grow: $int;
|
199
|
+
-ms-flex-positive: $int;
|
200
|
+
flex-grow: $int;
|
201
|
+
}
|
202
|
+
|
203
|
+
//----------------------------------------------------------------------
|
204
|
+
|
205
|
+
// Flexbox Shrink
|
206
|
+
//
|
207
|
+
// The 'flex-shrink' property sets the flex shrink factor. Negative numbers
|
208
|
+
// are invalid.
|
209
|
+
//
|
210
|
+
// Default: 1
|
211
|
+
//
|
212
|
+
// http://w3.org/tr/css3-flexbox/#flex-shrink-property
|
213
|
+
|
214
|
+
@mixin flex-shrink($int: 1) {
|
215
|
+
-webkit-flex-shrink: $int;
|
216
|
+
-moz-flex-shrink: $int;
|
217
|
+
-ms-flex-negative: $int;
|
218
|
+
flex-shrink: $int;
|
219
|
+
}
|
220
|
+
|
221
|
+
//----------------------------------------------------------------------
|
222
|
+
|
223
|
+
// Flexbox Basis
|
224
|
+
//
|
225
|
+
// The 'flex-basis' property sets the flex basis. Negative lengths are invalid.
|
226
|
+
//
|
227
|
+
// Values: Like "width"
|
228
|
+
// Default: auto
|
229
|
+
//
|
230
|
+
// http://www.w3.org/TR/css3-flexbox/#flex-basis-property
|
231
|
+
|
232
|
+
@mixin flex-basis($value: auto) {
|
233
|
+
-webkit-flex-basis: $value;
|
234
|
+
-moz-flex-basis: $value;
|
235
|
+
-ms-flex-preferred-size: $value;
|
236
|
+
flex-basis: $value;
|
237
|
+
}
|
238
|
+
|
239
|
+
//----------------------------------------------------------------------
|
240
|
+
|
241
|
+
// Flexbox "Flex" (shorthand)
|
242
|
+
//
|
243
|
+
// The 'flex' property specifies the components of a flexible length: the
|
244
|
+
// flex grow factor and flex shrink factor, and the flex basis. When an
|
245
|
+
// element is a flex item, 'flex' is consulted instead of the main size
|
246
|
+
// property to determine the main size of the element. If an element is
|
247
|
+
// not a flex item, 'flex' has no effect.
|
248
|
+
//
|
249
|
+
// Values: none | <flex-grow> <flex-shrink> || <flex-basis>
|
250
|
+
// Default: See individual properties (1 1 0).
|
251
|
+
//
|
252
|
+
// http://w3.org/tr/css3-flexbox/#flex-property
|
253
|
+
|
254
|
+
@mixin flex($fg: 1, $fs: null, $fb: null) {
|
255
|
+
|
256
|
+
// Set a variable to be used by box-flex properties
|
257
|
+
$fg-boxflex: $fg;
|
258
|
+
|
259
|
+
// Box-Flex only supports a flex-grow value so let's grab the
|
260
|
+
// first item in the list and just return that.
|
261
|
+
@if type-of($fg) == "list" {
|
262
|
+
$fg-boxflex: nth($fg, 1);
|
263
|
+
}
|
264
|
+
|
265
|
+
-webkit-box-flex: $fg-boxflex;
|
266
|
+
-webkit-flex: $fg $fs $fb;
|
267
|
+
-moz-box-flex: $fg-boxflex;
|
268
|
+
-moz-flex: $fg $fs $fb;
|
269
|
+
-ms-flex: $fg $fs $fb;
|
270
|
+
flex: $fg $fs $fb;
|
271
|
+
}
|
272
|
+
|
273
|
+
//----------------------------------------------------------------------
|
274
|
+
|
275
|
+
// Flexbox Justify Content
|
276
|
+
//
|
277
|
+
// The 'justify-content' property aligns flex items along the main axis
|
278
|
+
// of the current line of the flex container. This is done after any flexible
|
279
|
+
// lengths and any auto margins have been resolved. Typically it helps distribute
|
280
|
+
// extra free space leftover when either all the flex items on a line are
|
281
|
+
// inflexible, or are flexible but have reached their maximum size. It also
|
282
|
+
// exerts some control over the alignment of items when they overflow the line.
|
283
|
+
//
|
284
|
+
// Note: 'space-*' values not supported in older syntaxes.
|
285
|
+
//
|
286
|
+
// Values: flex-start | flex-end | center | space-between | space-around
|
287
|
+
// Default: flex-start
|
288
|
+
//
|
289
|
+
// http://w3.org/tr/css3-flexbox/#justify-content-property
|
290
|
+
|
291
|
+
@mixin justify-content($value: flex-start) {
|
292
|
+
@if $value == flex-start {
|
293
|
+
-webkit-box-pack: start;
|
294
|
+
-ms-flex-pack: start;
|
295
|
+
} @else if $value == flex-end {
|
296
|
+
-webkit-box-pack: end;
|
297
|
+
-ms-flex-pack: end;
|
298
|
+
} @else if $value == space-between {
|
299
|
+
-webkit-box-pack: justify;
|
300
|
+
-ms-flex-pack: justify;
|
301
|
+
} @else if $value == space-around {
|
302
|
+
-ms-flex-pack: distribute;
|
303
|
+
} @else {
|
304
|
+
-webkit-box-pack: $value;
|
305
|
+
-ms-flex-pack: $value;
|
306
|
+
}
|
307
|
+
-webkit-justify-content: $value;
|
308
|
+
-moz-justify-content: $value;
|
309
|
+
justify-content: $value;
|
310
|
+
}
|
311
|
+
// Shorter version:
|
312
|
+
@mixin flex-just($args...) { @include justify-content($args...); }
|
313
|
+
|
314
|
+
//----------------------------------------------------------------------
|
315
|
+
|
316
|
+
// Flexbox Align Items
|
317
|
+
//
|
318
|
+
// Flex items can be aligned in the cross axis of the current line of the
|
319
|
+
// flex container, similar to 'justify-content' but in the perpendicular
|
320
|
+
// direction. 'align-items' sets the default alignment for all of the flex
|
321
|
+
// container's items, including anonymous flex items. 'align-self' allows
|
322
|
+
// this default alignment to be overridden for individual flex items. (For
|
323
|
+
// anonymous flex items, 'align-self' always matches the value of 'align-items'
|
324
|
+
// on their associated flex container.)
|
325
|
+
//
|
326
|
+
// Values: flex-start | flex-end | center | baseline | stretch
|
327
|
+
// Default: stretch
|
328
|
+
//
|
329
|
+
// http://w3.org/tr/css3-flexbox/#align-items-property
|
330
|
+
|
331
|
+
@mixin align-items($value: stretch) {
|
332
|
+
@if $value == flex-start {
|
333
|
+
-webkit-box-align: start;
|
334
|
+
-ms-flex-align: start;
|
335
|
+
} @else if $value == flex-end {
|
336
|
+
-webkit-box-align: end;
|
337
|
+
-ms-flex-align: end;
|
338
|
+
} @else {
|
339
|
+
-webkit-box-align: $value;
|
340
|
+
-ms-flex-align: $value;
|
341
|
+
}
|
342
|
+
-webkit-align-items: $value;
|
343
|
+
-moz-align-items: $value;
|
344
|
+
align-items: $value;
|
345
|
+
}
|
346
|
+
|
347
|
+
//----------------------------------
|
348
|
+
|
349
|
+
// Flexbox Align Self
|
350
|
+
//
|
351
|
+
// Values: auto | flex-start | flex-end | center | baseline | stretch
|
352
|
+
// Default: auto
|
353
|
+
|
354
|
+
@mixin align-self($value: auto) {
|
355
|
+
// No Webkit Box Fallback.
|
356
|
+
-webkit-align-self: $value;
|
357
|
+
-moz-align-self: $value;
|
358
|
+
@if $value == flex-start {
|
359
|
+
-ms-flex-item-align: start;
|
360
|
+
} @else if $value == flex-end {
|
361
|
+
-ms-flex-item-align: end;
|
362
|
+
} @else {
|
363
|
+
-ms-flex-item-align: $value;
|
364
|
+
}
|
365
|
+
align-self: $value;
|
366
|
+
}
|
367
|
+
|
368
|
+
//----------------------------------------------------------------------
|
369
|
+
|
370
|
+
// Flexbox Align Content
|
371
|
+
//
|
372
|
+
// The 'align-content' property aligns a flex container's lines within the
|
373
|
+
// flex container when there is extra space in the cross-axis, similar to
|
374
|
+
// how 'justify-content' aligns individual items within the main-axis. Note,
|
375
|
+
// this property has no effect when the flexbox has only a single line.
|
376
|
+
//
|
377
|
+
// Values: flex-start | flex-end | center | space-between | space-around | stretch
|
378
|
+
// Default: stretch
|
379
|
+
//
|
380
|
+
// http://w3.org/tr/css3-flexbox/#align-content-property
|
381
|
+
|
382
|
+
@mixin align-content($value: stretch) {
|
383
|
+
// No Webkit Box Fallback.
|
384
|
+
-webkit-align-content: $value;
|
385
|
+
-moz-align-content: $value;
|
386
|
+
@if $value == flex-start {
|
387
|
+
-ms-flex-line-pack: start;
|
388
|
+
} @else if $value == flex-end {
|
389
|
+
-ms-flex-line-pack: end;
|
390
|
+
} @else {
|
391
|
+
-ms-flex-line-pack: $value;
|
392
|
+
}
|
393
|
+
align-content: $value;
|
394
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
$grid-columns: 12;
|
2
|
+
|
3
|
+
.grid-container {
|
4
|
+
@include overflow(hidden);
|
5
|
+
}
|
6
|
+
.cell {
|
7
|
+
min-width: 0;
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin make-cell($columns) {
|
11
|
+
@if $columns == "auto" {
|
12
|
+
@include flex(1 1 0);
|
13
|
+
width: auto;
|
14
|
+
} @else if $columns == "shrink" {
|
15
|
+
@include flex(0 0 auto);
|
16
|
+
width: auto;
|
17
|
+
} @else if $columns == "stretch" {
|
18
|
+
@include flex(1);
|
19
|
+
} @else {
|
20
|
+
@include flex(none);
|
21
|
+
width: percentage(calc($columns / $grid-columns));
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
@mixin make-grid-cell($columns, $breakpoint) {
|
26
|
+
@include media-breakpoint-up($breakpoint) {
|
27
|
+
.cell--#{breakpoint-infix($breakpoint)}#{$columns} {
|
28
|
+
@include make-cell($columns);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.grid {
|
34
|
+
@include flexbox();
|
35
|
+
@include flex-wrap(wrap);
|
36
|
+
& > {
|
37
|
+
@each $breakpoint in map-keys($responsive) {
|
38
|
+
@for $i from 1 through $grid-columns {
|
39
|
+
@include make-grid-cell($i, $breakpoint);
|
40
|
+
}
|
41
|
+
@include make-grid-cell("auto", $breakpoint);
|
42
|
+
@include make-grid-cell("shrink", $breakpoint);
|
43
|
+
@include make-grid-cell("stretch", $breakpoint);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
.grid--reverse {
|
49
|
+
flex-direction: row-reverse;
|
50
|
+
}
|
51
|
+
|
52
|
+
@mixin make-grid() {
|
53
|
+
$types: ("p");
|
54
|
+
$directions: ("x", "y", "");
|
55
|
+
$spacers: (0, 1, 2, 3, 4, 5);
|
56
|
+
|
57
|
+
@each $type in $types {
|
58
|
+
@each $direction in $directions {
|
59
|
+
@each $spacer in $spacers {
|
60
|
+
@if $direction == "" {
|
61
|
+
.grid--#{$type}-#{$spacer} {
|
62
|
+
@include make-spacing("m", "", $spacer, true);
|
63
|
+
.cell {
|
64
|
+
@include make-spacing($type, "", $spacer);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
} @else {
|
68
|
+
.grid--#{$type}#{$direction}-#{$spacer} {
|
69
|
+
@include make-spacing("m", $direction, $spacer, true);
|
70
|
+
.cell {
|
71
|
+
@include make-spacing($type, $direction, $spacer);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
@include make-grid();
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@mixin horizontal-rules() {
|
2
|
+
&::before {
|
3
|
+
display: block;
|
4
|
+
font-size: map-get($base, font-size-h2);
|
5
|
+
color: $text-color-l;
|
6
|
+
text-align: center;
|
7
|
+
letter-spacing: map-get($spacers, 4);
|
8
|
+
content: "...";
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.horizontal-rules {
|
13
|
+
@include horizontal-rules();
|
14
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@mixin link-colors($clr, $hover-clr: default, $active-clr: default, $focus-clr: null, $theme: default, $ignore-path: false) {
|
2
|
+
@include plain() {
|
3
|
+
text-decoration: none;
|
4
|
+
}
|
5
|
+
@include hover() {
|
6
|
+
text-decoration: underline;
|
7
|
+
}
|
8
|
+
@include active() {
|
9
|
+
text-decoration: none;
|
10
|
+
}
|
11
|
+
@include clickable($clr, null, $hover-clr, null, $active-clr, null, $focus-clr, null, $theme, $ignore-path);
|
12
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@mixin media-breakpoint-down($name, $breakpoints: default) {
|
2
|
+
@if $breakpoints == default {
|
3
|
+
$breakpoints: $responsive;
|
4
|
+
}
|
5
|
+
@media (max-width: map-get($breakpoints, $name) - 1) {
|
6
|
+
@content;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin media-breakpoint-up($name, $breakpoints: default) {
|
11
|
+
@if $breakpoints == default {
|
12
|
+
$breakpoints: $responsive;
|
13
|
+
}
|
14
|
+
@media (min-width: map-get($breakpoints, $name)) {
|
15
|
+
@content;
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@mixin overflow($overflow: auto, $direction: default) {
|
2
|
+
@if $direction == default {
|
3
|
+
overflow: $overflow;
|
4
|
+
} @else if $direction == "x" {
|
5
|
+
@if $overflow == auto {
|
6
|
+
overflow: hidden;
|
7
|
+
}
|
8
|
+
overflow-x: $overflow;
|
9
|
+
} @else if $direction == "y" {
|
10
|
+
@if $overflow == auto {
|
11
|
+
overflow: hidden;
|
12
|
+
}
|
13
|
+
overflow-y: $overflow;
|
14
|
+
}
|
15
|
+
@if $overflow == auto {
|
16
|
+
-webkit-overflow-scrolling: touch;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.of-auto {
|
21
|
+
@include overflow(auto);
|
22
|
+
}
|
23
|
+
|
24
|
+
.of-hidden {
|
25
|
+
@include overflow(hidden);
|
26
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@mixin plain() {
|
2
|
+
&,
|
3
|
+
&:link,
|
4
|
+
&:visited {
|
5
|
+
@content;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin hover() {
|
10
|
+
.root[data-is-touch="false"] &:hover {
|
11
|
+
@content;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
@mixin active() {
|
16
|
+
.root[data-is-touch] &.active,
|
17
|
+
.root[data-is-touch] &:active {
|
18
|
+
@content;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin focus() {
|
23
|
+
.root[data-is-touch] &.focus {
|
24
|
+
@content;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin disabled() {
|
29
|
+
&.disabled,
|
30
|
+
&:disabled {
|
31
|
+
@content;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@mixin box-shadow($level: default, $color: default) {
|
2
|
+
@if $color == default {
|
3
|
+
$color: #000;
|
4
|
+
}
|
5
|
+
@if $level == 0 {
|
6
|
+
box-shadow: none;
|
7
|
+
}
|
8
|
+
@if $level == 1 or $level == default {
|
9
|
+
box-shadow: 0 4px 8px rgba($color, .23), 0 1px 3px rgba($color, .08), 0 6px 12px rgba($color, .02);
|
10
|
+
}
|
11
|
+
@if $level == 2 {
|
12
|
+
box-shadow: 0 8px 16px rgba($color, .23), 0 2px 6px rgba($color, .08), 0 12px 24px rgba($color, .02);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.box-shadow-1 {
|
17
|
+
@include box-shadow();
|
18
|
+
}
|
19
|
+
|
20
|
+
.box-shadow-2 {
|
21
|
+
@include box-shadow(2);
|
22
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
@mixin make-spacing($property, $side, $spacer, $negative: false) {
|
2
|
+
|
3
|
+
$css_property: null;
|
4
|
+
$css_sides: null;
|
5
|
+
|
6
|
+
@if ($property == "m") {
|
7
|
+
$css_property: "margin";
|
8
|
+
} @else if ($property == "p") {
|
9
|
+
$css_property: "padding";
|
10
|
+
}
|
11
|
+
|
12
|
+
@if ($side == "t") {
|
13
|
+
$css_sides: ("top");
|
14
|
+
}
|
15
|
+
@else if ($side == "b") {
|
16
|
+
$css_sides: ("bottom");
|
17
|
+
}
|
18
|
+
@else if ($side == "l") {
|
19
|
+
$css_sides: ("left");
|
20
|
+
}
|
21
|
+
@else if ($side == "r") {
|
22
|
+
$css_sides: ("right");
|
23
|
+
}
|
24
|
+
@else if ($side == "x") {
|
25
|
+
$css_sides: ("left", "right");
|
26
|
+
}
|
27
|
+
@else if ($side == "y") {
|
28
|
+
$css_sides: ("top", "bottom");
|
29
|
+
}
|
30
|
+
@else if ($side == "") {
|
31
|
+
$css_sides: ("");
|
32
|
+
}
|
33
|
+
|
34
|
+
@each $side in $css_sides {
|
35
|
+
@if ($spacer == "auto") {
|
36
|
+
@if ($side == "") {
|
37
|
+
#{$css_property}: auto;
|
38
|
+
} @else {
|
39
|
+
#{$css_property}-#{$side}: auto;
|
40
|
+
}
|
41
|
+
} @else {
|
42
|
+
@if ($side == "") {
|
43
|
+
@if ($negative == true) {
|
44
|
+
#{$css_property}: - map-get($spacers, $spacer);
|
45
|
+
} @else {
|
46
|
+
#{$css_property}: map-get($spacers, $spacer);
|
47
|
+
}
|
48
|
+
} @else {
|
49
|
+
@if ($negative == true) {
|
50
|
+
#{$css_property}-#{$side}: - map-get($spacers, $spacer);
|
51
|
+
} @else {
|
52
|
+
#{$css_property}-#{$side}: map-get($spacers, $spacer);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
@mixin make-spacings() {
|
60
|
+
$propertys: ("m", "p");
|
61
|
+
$sides: ("t", "b", "l", "r", "x", "y", "");
|
62
|
+
$spacers: (0, 1, 2, 3, 4, 5);
|
63
|
+
|
64
|
+
@each $property in $propertys {
|
65
|
+
@each $side in $sides {
|
66
|
+
@each $spacer in $spacers {
|
67
|
+
.#{$property}#{$side}-#{$spacer} {
|
68
|
+
@include make-spacing($property, $side, $spacer);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
@each $side in $sides {
|
75
|
+
.m#{$side}-auto {
|
76
|
+
@include make-spacing("m", $side, "auto");
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
@include make-spacings();
|