wirecss_rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +59 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/wirecss_rails.rb +5 -0
- data/lib/wirecss_rails/engine.rb +4 -0
- data/lib/wirecss_rails/version.rb +3 -0
- data/vendor/assets/javascripts/wire.js +112 -0
- data/vendor/assets/stylesheets/_config.scss +80 -0
- data/vendor/assets/stylesheets/base/_global.scss +22 -0
- data/vendor/assets/stylesheets/base/_helpers.scss +109 -0
- data/vendor/assets/stylesheets/base/_mixins.scss +67 -0
- data/vendor/assets/stylesheets/base/_normalize.scss +440 -0
- data/vendor/assets/stylesheets/components/_buttons.scss +64 -0
- data/vendor/assets/stylesheets/components/_forms.scss +84 -0
- data/vendor/assets/stylesheets/components/_grid.scss +456 -0
- data/vendor/assets/stylesheets/components/_images.scss +11 -0
- data/vendor/assets/stylesheets/components/_list.scss +43 -0
- data/vendor/assets/stylesheets/components/_tables.scss +49 -0
- data/vendor/assets/stylesheets/components/_typography.scss +80 -0
- data/vendor/assets/stylesheets/tools/_debug.scss +126 -0
- data/vendor/assets/stylesheets/wire.scss +32 -0
- data/wirecss_rails.gemspec +36 -0
- metadata +116 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
// ----------------------
|
2
|
+
//
|
3
|
+
// MIXINS
|
4
|
+
//
|
5
|
+
// ----------------------
|
6
|
+
// ----------------------
|
7
|
+
// Media Queries
|
8
|
+
// Use predefined breakpoints defined in $wire-breakpoints or use custom value
|
9
|
+
// mq(phone)
|
10
|
+
// mq(phone, landscape)
|
11
|
+
// mq(820px)
|
12
|
+
// mq(768px, 1024px, landscape)
|
13
|
+
// ----------------------
|
14
|
+
@mixin mq($min, $max: false, $orientation: false) {
|
15
|
+
@if map-has-key($wire-breakpoints, $min) {
|
16
|
+
@if not $orientation {
|
17
|
+
@media #{map-get($wire-breakpoints, $min)} {
|
18
|
+
@content;
|
19
|
+
}
|
20
|
+
} @else {
|
21
|
+
@if map-has-key($wire-breakpoints, $min) {
|
22
|
+
@media #{map-get($wire-breakpoints, $min)} and (orientation : $orientation) {
|
23
|
+
@content;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
} @else {
|
28
|
+
@if not $max {
|
29
|
+
@media (max-width: #{$min}) {
|
30
|
+
@content;
|
31
|
+
}
|
32
|
+
} @else {
|
33
|
+
@if not $orientation {
|
34
|
+
@media (min-width: #{$min}) and (max-width: #{$max}) {
|
35
|
+
@content;
|
36
|
+
}
|
37
|
+
} @else {
|
38
|
+
@media (min-width: #{$min}) and (max-width: #{$max}) and (orientation: #{$orientation}) {
|
39
|
+
@content;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// ----------------------
|
47
|
+
// FontFace
|
48
|
+
// fontface(name, filename, weight, style, stretch)
|
49
|
+
// ----------------------
|
50
|
+
@function font-url($path) {
|
51
|
+
@return url('fonts/' + $path);
|
52
|
+
}
|
53
|
+
|
54
|
+
@mixin font-face($font-family, $font-filename, $font-weight : normal, $font-style :normal, $font-stretch : normal) {
|
55
|
+
@font-face {
|
56
|
+
font-family: '#{$font-family}';
|
57
|
+
src: font-url('#{$font-filename}.eot');
|
58
|
+
src: font-url('#{$font-filename}.eot?#iefix') format('embedded-opentype'),
|
59
|
+
font-url('#{$font-filename}.woff') format('woff'),
|
60
|
+
font-url('#{$font-filename}.ttf') format('truetype'),
|
61
|
+
font-url('#{$font-filename}.otf') format('truetype'),
|
62
|
+
font-url('#{$font-filename}.svg##{$font-family}') format('svg');
|
63
|
+
font-weight: $font-weight;
|
64
|
+
font-style: $font-style;
|
65
|
+
font-stretch: $font-stretch;
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,440 @@
|
|
1
|
+
/* ----------------------
|
2
|
+
//
|
3
|
+
// RESET (Normalize)
|
4
|
+
//
|
5
|
+
// ----------------------
|
6
|
+
|
7
|
+
/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */
|
8
|
+
|
9
|
+
/**
|
10
|
+
* 1. Change the default font family in all browsers (opinionated).
|
11
|
+
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
|
12
|
+
*/
|
13
|
+
|
14
|
+
html {
|
15
|
+
font-family: sans-serif; /* 1 */
|
16
|
+
|
17
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
18
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Remove the margin in all browsers (opinionated).
|
23
|
+
*/
|
24
|
+
|
25
|
+
body {
|
26
|
+
margin: 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
/* HTML5 display definitions
|
30
|
+
========================================================================== */
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Add the correct display in IE 9-.
|
34
|
+
* 1. Add the correct display in Edge, IE, and Firefox.
|
35
|
+
* 2. Add the correct display in IE.
|
36
|
+
*/
|
37
|
+
|
38
|
+
article,
|
39
|
+
aside,
|
40
|
+
details,
|
41
|
+
/* 1 */
|
42
|
+
figcaption,
|
43
|
+
figure,
|
44
|
+
footer,
|
45
|
+
header,
|
46
|
+
main,
|
47
|
+
/* 2 */
|
48
|
+
menu,
|
49
|
+
nav,
|
50
|
+
section,
|
51
|
+
summary {
|
52
|
+
/* 1 */
|
53
|
+
display: block;
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Add the correct display in IE 9-.
|
58
|
+
*/
|
59
|
+
|
60
|
+
audio,
|
61
|
+
canvas,
|
62
|
+
progress,
|
63
|
+
video {
|
64
|
+
display: inline-block;
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Add the correct display in iOS 4-7.
|
69
|
+
*/
|
70
|
+
|
71
|
+
audio:not([controls]) {
|
72
|
+
display: none;
|
73
|
+
height: 0;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
78
|
+
*/
|
79
|
+
|
80
|
+
progress {
|
81
|
+
vertical-align: baseline;
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Add the correct display in IE 10-.
|
86
|
+
* 1. Add the correct display in IE.
|
87
|
+
*/
|
88
|
+
|
89
|
+
template,
|
90
|
+
/* 1 */
|
91
|
+
[hidden] {
|
92
|
+
display: none;
|
93
|
+
}
|
94
|
+
|
95
|
+
/* Links
|
96
|
+
========================================================================== */
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Remove the gray background on active links in IE 10.
|
100
|
+
*/
|
101
|
+
|
102
|
+
a {
|
103
|
+
background-color: transparent;
|
104
|
+
}
|
105
|
+
|
106
|
+
/**
|
107
|
+
* Remove the outline on focused links when they are also active or hovered
|
108
|
+
* in all browsers (opinionated).
|
109
|
+
*/
|
110
|
+
|
111
|
+
a:active,
|
112
|
+
a:hover {
|
113
|
+
outline-width: 0;
|
114
|
+
}
|
115
|
+
|
116
|
+
/* Text-level semantics
|
117
|
+
========================================================================== */
|
118
|
+
|
119
|
+
/**
|
120
|
+
* 1. Remove the bottom border in Firefox 39-.
|
121
|
+
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
122
|
+
*/
|
123
|
+
|
124
|
+
abbr[title] {
|
125
|
+
border-bottom: none; /* 1 */
|
126
|
+
text-decoration: underline; /* 2 */
|
127
|
+
text-decoration: underline dotted; /* 2 */
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
132
|
+
*/
|
133
|
+
|
134
|
+
b,
|
135
|
+
strong {
|
136
|
+
font-weight: inherit;
|
137
|
+
}
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
141
|
+
*/
|
142
|
+
|
143
|
+
b,
|
144
|
+
strong {
|
145
|
+
font-weight: bolder;
|
146
|
+
}
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Add the correct font style in Android 4.3-.
|
150
|
+
*/
|
151
|
+
|
152
|
+
dfn {
|
153
|
+
font-style: italic;
|
154
|
+
}
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Correct the font size and margin on `h1` elements within `section` and
|
158
|
+
* `article` contexts in Chrome, Firefox, and Safari.
|
159
|
+
*/
|
160
|
+
|
161
|
+
h1 {
|
162
|
+
font-size: 2em;
|
163
|
+
margin: .67em 0;
|
164
|
+
}
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Add the correct background and color in IE 9-.
|
168
|
+
*/
|
169
|
+
|
170
|
+
mark {
|
171
|
+
background-color: #ffff00;
|
172
|
+
color: #000000;
|
173
|
+
}
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Add the correct font size in all browsers.
|
177
|
+
*/
|
178
|
+
|
179
|
+
small {
|
180
|
+
font-size: 80%;
|
181
|
+
}
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Prevent `sub` and `sup` elements from affecting the line height in
|
185
|
+
* all browsers.
|
186
|
+
*/
|
187
|
+
|
188
|
+
sub,
|
189
|
+
sup {
|
190
|
+
font-size: 75%;
|
191
|
+
line-height: 0;
|
192
|
+
position: relative;
|
193
|
+
vertical-align: baseline;
|
194
|
+
}
|
195
|
+
|
196
|
+
sub {
|
197
|
+
bottom: -.25em;
|
198
|
+
}
|
199
|
+
|
200
|
+
sup {
|
201
|
+
top: -.5em;
|
202
|
+
}
|
203
|
+
|
204
|
+
/* Embedded content
|
205
|
+
========================================================================== */
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Remove the border on images inside links in IE 10-.
|
209
|
+
*/
|
210
|
+
|
211
|
+
img {
|
212
|
+
border-style: none;
|
213
|
+
}
|
214
|
+
|
215
|
+
/**
|
216
|
+
* Hide the overflow in IE.
|
217
|
+
*/
|
218
|
+
|
219
|
+
svg:not(:root) {
|
220
|
+
overflow: hidden;
|
221
|
+
}
|
222
|
+
|
223
|
+
/* Grouping content
|
224
|
+
========================================================================== */
|
225
|
+
|
226
|
+
/**
|
227
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
228
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
229
|
+
*/
|
230
|
+
|
231
|
+
code,
|
232
|
+
kbd,
|
233
|
+
pre,
|
234
|
+
samp {
|
235
|
+
font-family: monospace, monospace; /* 1 */
|
236
|
+
font-size: 1em; /* 2 */
|
237
|
+
}
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Add the correct margin in IE 8.
|
241
|
+
*/
|
242
|
+
|
243
|
+
figure {
|
244
|
+
margin: 1em 40px;
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* 1. Add the correct box sizing in Firefox.
|
249
|
+
* 2. Show the overflow in Edge and IE.
|
250
|
+
*/
|
251
|
+
|
252
|
+
hr {
|
253
|
+
box-sizing: content-box; /* 1 */
|
254
|
+
height: 0; /* 1 */
|
255
|
+
overflow: visible; /* 2 */
|
256
|
+
}
|
257
|
+
|
258
|
+
/* Forms
|
259
|
+
========================================================================== */
|
260
|
+
|
261
|
+
/**
|
262
|
+
* Change font properties to `inherit` in all browsers (opinionated).
|
263
|
+
*/
|
264
|
+
|
265
|
+
button,
|
266
|
+
input,
|
267
|
+
select,
|
268
|
+
textarea {
|
269
|
+
font: inherit;
|
270
|
+
}
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Restore the font weight unset by the previous rule.
|
274
|
+
*/
|
275
|
+
|
276
|
+
optgroup {
|
277
|
+
font-weight: bold;
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Show the overflow in IE.
|
282
|
+
* 1. Show the overflow in Edge.
|
283
|
+
* 2. Show the overflow in Edge, Firefox, and IE.
|
284
|
+
*/
|
285
|
+
|
286
|
+
button,
|
287
|
+
input,
|
288
|
+
/* 1 */
|
289
|
+
select {
|
290
|
+
/* 2 */
|
291
|
+
overflow: visible;
|
292
|
+
}
|
293
|
+
|
294
|
+
/**
|
295
|
+
* Remove the margin in Safari.
|
296
|
+
* 1. Remove the margin in Firefox and Safari.
|
297
|
+
*/
|
298
|
+
|
299
|
+
button,
|
300
|
+
input,
|
301
|
+
select,
|
302
|
+
textarea {
|
303
|
+
/* 1 */
|
304
|
+
margin: 0;
|
305
|
+
}
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
309
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
310
|
+
*/
|
311
|
+
|
312
|
+
button,
|
313
|
+
select {
|
314
|
+
/* 1 */
|
315
|
+
text-transform: none;
|
316
|
+
}
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Change the cursor in all browsers (opinionated).
|
320
|
+
*/
|
321
|
+
|
322
|
+
button,
|
323
|
+
[type="button"],
|
324
|
+
[type="reset"],
|
325
|
+
[type="submit"] {
|
326
|
+
cursor: pointer;
|
327
|
+
}
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Restore the default cursor to disabled elements unset by the previous rule.
|
331
|
+
*/
|
332
|
+
|
333
|
+
[disabled] {
|
334
|
+
cursor: default;
|
335
|
+
}
|
336
|
+
|
337
|
+
/**
|
338
|
+
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
339
|
+
* controls in Android 4.
|
340
|
+
* 2. Correct the inability to style clickable types in iOS.
|
341
|
+
*/
|
342
|
+
|
343
|
+
button,
|
344
|
+
html [type="button"],
|
345
|
+
/* 1 */
|
346
|
+
[type="reset"],
|
347
|
+
[type="submit"] {
|
348
|
+
-webkit-appearance: button; /* 2 */
|
349
|
+
}
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Remove the inner border and padding in Firefox.
|
353
|
+
*/
|
354
|
+
|
355
|
+
button::-moz-focus-inner,
|
356
|
+
input::-moz-focus-inner {
|
357
|
+
border: 0;
|
358
|
+
padding: 0;
|
359
|
+
}
|
360
|
+
|
361
|
+
/**
|
362
|
+
* Restore the focus styles unset by the previous rule.
|
363
|
+
*/
|
364
|
+
|
365
|
+
button:-moz-focusring,
|
366
|
+
input:-moz-focusring {
|
367
|
+
outline: 1px dotted ButtonText;
|
368
|
+
}
|
369
|
+
|
370
|
+
/**
|
371
|
+
* Change the border, margin, and padding in all browsers (opinionated).
|
372
|
+
*/
|
373
|
+
|
374
|
+
fieldset {
|
375
|
+
border: 1px solid #c0c0c0;
|
376
|
+
margin: 0 2px;
|
377
|
+
padding: .35em .625em .75em;
|
378
|
+
}
|
379
|
+
|
380
|
+
/**
|
381
|
+
* 1. Correct the text wrapping in Edge and IE.
|
382
|
+
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
383
|
+
* 3. Remove the padding so developers are not caught out when they zero out
|
384
|
+
* `fieldset` elements in all browsers.
|
385
|
+
*/
|
386
|
+
|
387
|
+
legend {
|
388
|
+
box-sizing: border-box; /* 1 */
|
389
|
+
color: inherit; /* 2 */
|
390
|
+
display: table; /* 1 */
|
391
|
+
max-width: 100%; /* 1 */
|
392
|
+
padding: 0; /* 3 */
|
393
|
+
white-space: normal; /* 1 */
|
394
|
+
}
|
395
|
+
|
396
|
+
/**
|
397
|
+
* Remove the default vertical scrollbar in IE.
|
398
|
+
*/
|
399
|
+
|
400
|
+
textarea {
|
401
|
+
overflow: auto;
|
402
|
+
}
|
403
|
+
|
404
|
+
/**
|
405
|
+
* 1. Add the correct box sizing in IE 10-.
|
406
|
+
* 2. Remove the padding in IE 10-.
|
407
|
+
*/
|
408
|
+
|
409
|
+
[type="checkbox"],
|
410
|
+
[type="radio"] {
|
411
|
+
box-sizing: border-box; /* 1 */
|
412
|
+
padding: 0; /* 2 */
|
413
|
+
}
|
414
|
+
|
415
|
+
/**
|
416
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
417
|
+
*/
|
418
|
+
|
419
|
+
[type="number"]::-webkit-inner-spin-button,
|
420
|
+
[type="number"]::-webkit-outer-spin-button {
|
421
|
+
height: auto;
|
422
|
+
}
|
423
|
+
|
424
|
+
/**
|
425
|
+
* Correct the odd appearance of search inputs in Chrome and Safari.
|
426
|
+
*/
|
427
|
+
|
428
|
+
[type="search"] {
|
429
|
+
-webkit-appearance: textfield;
|
430
|
+
}
|
431
|
+
|
432
|
+
/**
|
433
|
+
* Remove the inner padding and cancel buttons in Chrome on OS X and
|
434
|
+
* Safari on OS X.
|
435
|
+
*/
|
436
|
+
|
437
|
+
[type="search"]::-webkit-search-cancel-button,
|
438
|
+
[type="search"]::-webkit-search-decoration {
|
439
|
+
-webkit-appearance: none;
|
440
|
+
}
|