mice 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4a93596e085fe2152c31cf7d85a90601335932dd
4
+ data.tar.gz: 24ce6f593116207dba4acebe9e816d0e87a5d58b
5
+ SHA512:
6
+ metadata.gz: 7054d0457af118d38552254833abb57b9c35d954568780d4bfcd833ba501232b6f914eafdca9179d14477d26cebeb45e17265f7549d64deb04252c5b4c5f01d6
7
+ data.tar.gz: 0bd561298702081e6732936d892f1d89ad70fc8bd264096a042050e660ef51e06e459200a101bdf7742e5a2046071a12dd272988e74ea494e3bcb08f20b04434
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mice.gemspec
4
+ gemspec
5
+
6
+ gem "middleman", "~>3.3.2", :require => false
7
+
8
+ # Live-reloading plugin
9
+ gem "middleman-livereload", "~> 3.1.0", :require => false
10
+
11
+ # For faster file watcher updates on Windows:
12
+ gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw], :require => false
13
+
14
+ # Windows does not come with time zone data
15
+ gem "tzinfo-data", platforms: [:mswin, :mingw], :require => false
16
+
17
+ # Syntax Higlighting plugin
18
+ gem 'middleman-syntax', '~> 2.0.0'#, :require => false
data/Gemfile.lock ADDED
@@ -0,0 +1,132 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mice (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ activesupport (4.0.4)
10
+ i18n (~> 0.6, >= 0.6.9)
11
+ minitest (~> 4.2)
12
+ multi_json (~> 1.3)
13
+ thread_safe (~> 0.1)
14
+ tzinfo (~> 0.3.37)
15
+ chunky_png (1.3.0)
16
+ coffee-script (2.2.0)
17
+ coffee-script-source
18
+ execjs
19
+ coffee-script-source (1.7.0)
20
+ compass (0.12.5)
21
+ chunky_png (~> 1.2)
22
+ fssm (>= 0.2.7)
23
+ sass (~> 3.2.19)
24
+ compass-import-once (1.0.4)
25
+ sass (>= 3.2, < 3.5)
26
+ em-websocket (0.5.0)
27
+ eventmachine (>= 0.12.9)
28
+ http_parser.rb (~> 0.5.3)
29
+ erubis (2.7.0)
30
+ eventmachine (1.0.3)
31
+ execjs (2.0.2)
32
+ ffi (1.9.3)
33
+ fssm (0.2.10)
34
+ haml (4.0.5)
35
+ tilt
36
+ hike (1.2.3)
37
+ hooks (0.4.0)
38
+ uber (~> 0.0.4)
39
+ http_parser.rb (0.5.3)
40
+ i18n (0.6.9)
41
+ json (1.8.1)
42
+ kramdown (1.3.3)
43
+ listen (1.3.1)
44
+ rb-fsevent (>= 0.9.3)
45
+ rb-inotify (>= 0.9)
46
+ rb-kqueue (>= 0.2)
47
+ middleman (3.3.2)
48
+ coffee-script (~> 2.2.0)
49
+ compass (>= 0.12.4)
50
+ compass-import-once (~> 1.0.4)
51
+ execjs (~> 2.0)
52
+ haml (>= 4.0.5)
53
+ kramdown (~> 1.2)
54
+ middleman-core (= 3.3.2)
55
+ middleman-sprockets (>= 3.1.2)
56
+ sass (>= 3.2.17, < 4.0)
57
+ uglifier (~> 2.5)
58
+ middleman-core (3.3.2)
59
+ activesupport (~> 4.0.1)
60
+ bundler (~> 1.1)
61
+ erubis
62
+ hooks (~> 0.3)
63
+ i18n (~> 0.6.9)
64
+ listen (~> 1.1)
65
+ padrino-helpers (~> 0.12.1)
66
+ rack (>= 1.4.5, < 2.0)
67
+ rack-test (~> 0.6.2)
68
+ thor (>= 0.15.2, < 2.0)
69
+ tilt (~> 1.4.1, < 2.0)
70
+ middleman-livereload (3.1.1)
71
+ em-websocket (>= 0.2.0)
72
+ middleman-core (>= 3.0.2)
73
+ multi_json (~> 1.0)
74
+ rack-livereload
75
+ middleman-sprockets (3.3.2)
76
+ middleman-core (>= 3.2)
77
+ sprockets (~> 2.2)
78
+ sprockets-helpers (~> 1.1.0)
79
+ sprockets-sass (~> 1.0.0)
80
+ middleman-syntax (2.0.0)
81
+ middleman-core (~> 3.2)
82
+ rouge (~> 1.0)
83
+ minitest (4.7.5)
84
+ multi_json (1.9.2)
85
+ padrino-helpers (0.12.1)
86
+ i18n (~> 0.6, >= 0.6.7)
87
+ padrino-support (= 0.12.1)
88
+ tilt (~> 1.4.1)
89
+ padrino-support (0.12.1)
90
+ activesupport (>= 3.1)
91
+ rack (1.5.2)
92
+ rack-livereload (0.3.15)
93
+ rack
94
+ rack-test (0.6.2)
95
+ rack (>= 1.0)
96
+ rb-fsevent (0.9.4)
97
+ rb-inotify (0.9.3)
98
+ ffi (>= 0.5.0)
99
+ rb-kqueue (0.2.2)
100
+ ffi (>= 0.5.0)
101
+ rouge (1.3.3)
102
+ sass (3.2.19)
103
+ sprockets (2.12.0)
104
+ hike (~> 1.2)
105
+ multi_json (~> 1.0)
106
+ rack (~> 1.0)
107
+ tilt (~> 1.1, != 1.3.0)
108
+ sprockets-helpers (1.1.0)
109
+ sprockets (~> 2.0)
110
+ sprockets-sass (1.0.3)
111
+ sprockets (~> 2.0)
112
+ tilt (~> 1.1)
113
+ thor (0.19.1)
114
+ thread_safe (0.3.3)
115
+ tilt (1.4.1)
116
+ tzinfo (0.3.39)
117
+ uber (0.0.4)
118
+ uglifier (2.5.0)
119
+ execjs (>= 0.3.0)
120
+ json (>= 1.8.0)
121
+
122
+ PLATFORMS
123
+ ruby
124
+
125
+ DEPENDENCIES
126
+ bundler (~> 1.5)
127
+ mice!
128
+ middleman (~> 3.3.2)
129
+ middleman-livereload (~> 3.1.0)
130
+ middleman-syntax (~> 2.0.0)
131
+ tzinfo-data
132
+ wdm (~> 0.1.0)
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Miclle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Mice
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'mice'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install mice
18
+
19
+
20
+ ## Usage
21
+
22
+ TODO: Write usage instructions here
23
+
24
+
25
+ ## HTML/CSS Style Guide
26
+
27
+ http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml
28
+
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it ( http://github.com/miclle/mice/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create new Pull Request
37
+
38
+ ## Copyright and license
39
+
40
+ Code and documentation copyright 2014 Miclle. Code released under the MIT license. Docs released under Creative Commons.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,9 @@
1
+ module Mice
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ initializer "mice.assets.precompile" do |app|
5
+ # app.config.assets.precompile << %r(mice/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff)$)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Mice
2
+ VERSION = "0.0.1"
3
+ end
data/lib/mice.rb ADDED
@@ -0,0 +1,18 @@
1
+ require "mice/version"
2
+
3
+ module Mice
4
+ class << self
5
+ # Inspired by Kaminari
6
+ def load!
7
+
8
+ if defined?(::Rails)
9
+ require 'mice/engine'
10
+ end
11
+
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ Mice.load!
@@ -0,0 +1,178 @@
1
+ /*
2
+ * jQuery Email Autocomplete - v0.0.2
3
+ * A jQuery plugin that suggests and autocompletes the domain in email fields.
4
+ *
5
+ *
6
+ * Made by Low Yong Zhen <cephyz@gmail.com>
7
+ * Under MIT License < http://yzlow.mit-license.org>
8
+ */
9
+ "use strict";
10
+
11
+ (function ($, window, document, undefined) {
12
+
13
+ var pluginName = "emailautocomplete";
14
+ var defaults = {
15
+ suggClass: "eac-sugg",
16
+ domains: ["yahoo.com" ,"google.com" ,"hotmail.com" ,"gmail.com" ,"me.com" ,"aol.com" ,"mac.com" ,"live.com" ,"comcast.net" ,"googlemail.com" ,"msn.com" ,"hotmail.co.uk" ,"yahoo.co.uk" ,"facebook.com" ,"verizon.net" ,"sbcglobal.net" ,"att.net" ,"gmx.com" ,"mail.com" ,"outlook.com" ,"icloud.com"]
17
+ };
18
+
19
+ function Plugin(elem, options) {
20
+ this.$field = $(elem);
21
+ this.options = $.extend(true, {}, defaults, options); //we want deep extend
22
+ this._defaults = defaults;
23
+ this._domains = this.options.domains;
24
+ this.init();
25
+ }
26
+
27
+ Plugin.prototype = {
28
+ init: function () {
29
+
30
+ //shim indexOf
31
+ if (!Array.prototype.indexOf) {
32
+ this.doIndexOf();
33
+ }
34
+
35
+ //bind handlers
36
+ this.$field.on("keyup.eac", $.proxy(this.displaySuggestion, this));
37
+
38
+ this.$field.on("blur.eac", $.proxy(this.autocomplete, this));
39
+
40
+ //get input padding,border and margin to offset text
41
+ this.fieldLeftOffset = (this.$field.outerWidth(true) - this.$field.width()) / 2;
42
+
43
+ //wrap our field
44
+ var $wrap = $("<div class='eac-input-wrap' />").css({
45
+ display: this.$field.css("display"),
46
+ position: "relative",
47
+ fontSize: this.$field.css("fontSize")
48
+ });
49
+ this.$field.wrap($wrap);
50
+
51
+ //create container to test width of current val
52
+ this.$cval = $("<span class='eac-cval' />").css({
53
+ visibility: "hidden",
54
+ position: "absolute",
55
+ display: "inline-block",
56
+ fontFamily: this.$field.css("fontFamily"),
57
+ fontWeight: this.$field.css("fontWeight"),
58
+ letterSpacing: this.$field.css("letterSpacing")
59
+ }).insertAfter(this.$field);
60
+
61
+ //create the suggestion overlay
62
+ /* touchstart jquery 1.7+ */
63
+ var heightPad = (this.$field.outerHeight(true) - this.$field.height()) / 2; //padding+border
64
+ this.$suggOverlay = $("<span class='"+this.options.suggClass+"' />").css({
65
+ display: "block",
66
+ "box-sizing": "content-box", //standardize
67
+ lineHeight: this.$field.css('lineHeight'),
68
+ paddingTop: heightPad + "px",
69
+ paddingBottom: heightPad + "px",
70
+ fontFamily: this.$field.css("fontFamily"),
71
+ fontWeight: this.$field.css("fontWeight"),
72
+ letterSpacing: this.$field.css("letterSpacing"),
73
+ position: "absolute",
74
+ top: 0,
75
+ left: 0
76
+ }).insertAfter(this.$field).on("mousedown.eac touchstart.eac", $.proxy(this.autocomplete, this));
77
+
78
+ },
79
+
80
+ suggest: function (str) {
81
+ var str_arr = str.split("@");
82
+ if (str_arr.length > 1) {
83
+ str = str_arr.pop();
84
+ if (!str.length) {
85
+ return "";
86
+ }
87
+ } else {
88
+ return "";
89
+ }
90
+
91
+ var match = this._domains.filter(function (domain) {
92
+ return 0 === domain.indexOf(str);
93
+ }).shift() || "";
94
+
95
+ return match.replace(str, "");
96
+ },
97
+
98
+ autocomplete: function () {
99
+ if(typeof this.suggestion === "undefined"){
100
+ return false;
101
+ }
102
+ this.$field.val(this.val + this.suggestion);
103
+ this.$suggOverlay.html("");
104
+ this.$cval.html("");
105
+ },
106
+
107
+ /**
108
+ * Displays the suggestion, handler for field keyup event
109
+ */
110
+ displaySuggestion: function (e) {
111
+ this.val = this.$field.val();
112
+ this.suggestion = this.suggest(this.val);
113
+
114
+ if (!this.suggestion.length) {
115
+ this.$suggOverlay.html("");
116
+ } else {
117
+ e.preventDefault();
118
+ }
119
+
120
+ //update with new suggestion
121
+ this.$suggOverlay.html(this.suggestion);
122
+ this.$cval.html(this.val);
123
+
124
+ //find width of current input val so we can offset the suggestion text
125
+ var cvalWidth = this.$cval.width();
126
+
127
+ if(this.$field.outerWidth() > cvalWidth){
128
+ //offset our suggestion container
129
+ this.$suggOverlay.css('left', this.fieldLeftOffset + cvalWidth + "px");
130
+ }
131
+ },
132
+
133
+ /**
134
+ * indexof polyfill
135
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Polyfill
136
+ */
137
+ doIndexOf: function(){
138
+
139
+ Array.prototype.indexOf = function (searchElement, fromIndex) {
140
+ if ( this === undefined || this === null ) {
141
+ throw new TypeError( '"this" is null or not defined' );
142
+ }
143
+
144
+ var length = this.length >>> 0; // Hack to convert object.length to a UInt32
145
+
146
+ fromIndex = +fromIndex || 0;
147
+
148
+ if (Math.abs(fromIndex) === Infinity) {
149
+ fromIndex = 0;
150
+ }
151
+
152
+ if (fromIndex < 0) {
153
+ fromIndex += length;
154
+ if (fromIndex < 0) {
155
+ fromIndex = 0;
156
+ }
157
+ }
158
+
159
+ for (;fromIndex < length; fromIndex++) {
160
+ if (this[fromIndex] === searchElement) {
161
+ return fromIndex;
162
+ }
163
+ }
164
+
165
+ return -1;
166
+ };
167
+ }
168
+ };
169
+
170
+ $.fn[pluginName] = function (options) {
171
+ return this.each(function () {
172
+ if (!$.data(this, "yz_" + pluginName)) {
173
+ $.data(this, "yz_" + pluginName, new Plugin(this, options));
174
+ }
175
+ });
176
+ };
177
+
178
+ })(jQuery, window, document);
File without changes
@@ -0,0 +1,28 @@
1
+ // Clearfix
2
+ //
3
+ // For modern browsers
4
+ // 1. The space content is one way to avoid an Opera bug when the
5
+ // contenteditable attribute is included anywhere else in the document.
6
+ // Otherwise it causes space to appear at the top and bottom of elements
7
+ // that are clearfixed.
8
+ // 2. The use of `table` rather than `block` is only necessary if using
9
+ // `:before` to contain the top-margins of child elements.
10
+ //
11
+ // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12
+ @mixin clearfix() {
13
+ &:before,
14
+ &:after {
15
+ content: " "; // 1
16
+ display: table; // 2
17
+ }
18
+ &:after {
19
+ clear: both;
20
+ }
21
+ }
22
+
23
+ // Box sizing
24
+ @mixin box-sizing($boxmodel) {
25
+ -webkit-box-sizing: $boxmodel;
26
+ -moz-box-sizing: $boxmodel;
27
+ box-sizing: $boxmodel;
28
+ }
@@ -0,0 +1,425 @@
1
+ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
2
+
3
+ /**
4
+ * 1. Set default font family to sans-serif.
5
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
6
+ * user zoom.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ /**
16
+ * Remove default margin.
17
+ */
18
+
19
+ body {
20
+ margin: 0;
21
+ }
22
+
23
+ /* HTML5 display definitions
24
+ ========================================================================== */
25
+
26
+ /**
27
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
29
+ * Correct `block` display not defined for `main` in IE 11.
30
+ */
31
+
32
+ article,
33
+ aside,
34
+ details,
35
+ figcaption,
36
+ figure,
37
+ footer,
38
+ header,
39
+ hgroup,
40
+ main,
41
+ nav,
42
+ section,
43
+ summary {
44
+ display: block;
45
+ }
46
+
47
+ /**
48
+ * 1. Correct `inline-block` display not defined in IE 8/9.
49
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
50
+ */
51
+
52
+ audio,
53
+ canvas,
54
+ progress,
55
+ video {
56
+ display: inline-block; /* 1 */
57
+ vertical-align: baseline; /* 2 */
58
+ }
59
+
60
+ /**
61
+ * Prevent modern browsers from displaying `audio` without controls.
62
+ * Remove excess height in iOS 5 devices.
63
+ */
64
+
65
+ audio:not([controls]) {
66
+ display: none;
67
+ height: 0;
68
+ }
69
+
70
+ /**
71
+ * Address `[hidden]` styling not present in IE 8/9/10.
72
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
73
+ */
74
+
75
+ [hidden],
76
+ template {
77
+ display: none;
78
+ }
79
+
80
+ /* Links
81
+ ========================================================================== */
82
+
83
+ /**
84
+ * Remove the gray background color from active links in IE 10.
85
+ */
86
+
87
+ a {
88
+ background: transparent;
89
+ }
90
+
91
+ /**
92
+ * Improve readability when focused and also mouse hovered in all browsers.
93
+ */
94
+
95
+ a:active,
96
+ a:hover {
97
+ outline: 0;
98
+ }
99
+
100
+ /* Text-level semantics
101
+ ========================================================================== */
102
+
103
+ /**
104
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
105
+ */
106
+
107
+ abbr[title] {
108
+ border-bottom: 1px dotted;
109
+ }
110
+
111
+ /**
112
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
113
+ */
114
+
115
+ b,
116
+ strong {
117
+ font-weight: bold;
118
+ }
119
+
120
+ /**
121
+ * Address styling not present in Safari and Chrome.
122
+ */
123
+
124
+ dfn {
125
+ font-style: italic;
126
+ }
127
+
128
+ /**
129
+ * Address variable `h1` font-size and margin within `section` and `article`
130
+ * contexts in Firefox 4+, Safari, and Chrome.
131
+ */
132
+
133
+ h1 {
134
+ font-size: 2em;
135
+ margin: 0.67em 0;
136
+ }
137
+
138
+ /**
139
+ * Address styling not present in IE 8/9.
140
+ */
141
+
142
+ mark {
143
+ background: #ff0;
144
+ color: #000;
145
+ }
146
+
147
+ /**
148
+ * Address inconsistent and variable font size in all browsers.
149
+ */
150
+
151
+ small {
152
+ font-size: 80%;
153
+ }
154
+
155
+ /**
156
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
157
+ */
158
+
159
+ sub,
160
+ sup {
161
+ font-size: 75%;
162
+ line-height: 0;
163
+ position: relative;
164
+ vertical-align: baseline;
165
+ }
166
+
167
+ sup {
168
+ top: -0.5em;
169
+ }
170
+
171
+ sub {
172
+ bottom: -0.25em;
173
+ }
174
+
175
+ /* Embedded content
176
+ ========================================================================== */
177
+
178
+ /**
179
+ * Remove border when inside `a` element in IE 8/9/10.
180
+ */
181
+
182
+ img {
183
+ border: 0;
184
+ }
185
+
186
+ /**
187
+ * Correct overflow not hidden in IE 9/10/11.
188
+ */
189
+
190
+ svg:not(:root) {
191
+ overflow: hidden;
192
+ }
193
+
194
+ /* Grouping content
195
+ ========================================================================== */
196
+
197
+ /**
198
+ * Address margin not present in IE 8/9 and Safari.
199
+ */
200
+
201
+ figure {
202
+ margin: 1em 40px;
203
+ }
204
+
205
+ /**
206
+ * Address differences between Firefox and other browsers.
207
+ */
208
+
209
+ hr {
210
+ -moz-box-sizing: content-box;
211
+ box-sizing: content-box;
212
+ height: 0;
213
+ }
214
+
215
+ /**
216
+ * Contain overflow in all browsers.
217
+ */
218
+
219
+ pre {
220
+ overflow: auto;
221
+ }
222
+
223
+ /**
224
+ * Address odd `em`-unit font size rendering in all browsers.
225
+ */
226
+
227
+ code,
228
+ kbd,
229
+ pre,
230
+ samp {
231
+ font-family: monospace, monospace;
232
+ font-size: 1em;
233
+ }
234
+
235
+ /* Forms
236
+ ========================================================================== */
237
+
238
+ /**
239
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
240
+ * styling of `select`, unless a `border` property is set.
241
+ */
242
+
243
+ /**
244
+ * 1. Correct color not being inherited.
245
+ * Known issue: affects color of disabled elements.
246
+ * 2. Correct font properties not being inherited.
247
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
248
+ */
249
+
250
+ button,
251
+ input,
252
+ optgroup,
253
+ select,
254
+ textarea {
255
+ color: inherit; /* 1 */
256
+ font: inherit; /* 2 */
257
+ margin: 0; /* 3 */
258
+ }
259
+
260
+ /**
261
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
262
+ */
263
+
264
+ button {
265
+ overflow: visible;
266
+ }
267
+
268
+ /**
269
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
270
+ * All other form control elements do not inherit `text-transform` values.
271
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
272
+ * Correct `select` style inheritance in Firefox.
273
+ */
274
+
275
+ button,
276
+ select {
277
+ text-transform: none;
278
+ }
279
+
280
+ /**
281
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
282
+ * and `video` controls.
283
+ * 2. Correct inability to style clickable `input` types in iOS.
284
+ * 3. Improve usability and consistency of cursor style between image-type
285
+ * `input` and others.
286
+ */
287
+
288
+ button,
289
+ html input[type="button"], /* 1 */
290
+ input[type="reset"],
291
+ input[type="submit"] {
292
+ -webkit-appearance: button; /* 2 */
293
+ cursor: pointer; /* 3 */
294
+ }
295
+
296
+ /**
297
+ * Re-set default cursor for disabled elements.
298
+ */
299
+
300
+ button[disabled],
301
+ html input[disabled] {
302
+ cursor: default;
303
+ }
304
+
305
+ /**
306
+ * Remove inner padding and border in Firefox 4+.
307
+ */
308
+
309
+ button::-moz-focus-inner,
310
+ input::-moz-focus-inner {
311
+ border: 0;
312
+ padding: 0;
313
+ }
314
+
315
+ /**
316
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
317
+ * the UA stylesheet.
318
+ */
319
+
320
+ input {
321
+ line-height: normal;
322
+ }
323
+
324
+ /**
325
+ * It's recommended that you don't attempt to style these elements.
326
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
327
+ *
328
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
329
+ * 2. Remove excess padding in IE 8/9/10.
330
+ */
331
+
332
+ input[type="checkbox"],
333
+ input[type="radio"] {
334
+ box-sizing: border-box; /* 1 */
335
+ padding: 0; /* 2 */
336
+ }
337
+
338
+ /**
339
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
340
+ * `font-size` values of the `input`, it causes the cursor style of the
341
+ * decrement button to change from `default` to `text`.
342
+ */
343
+
344
+ input[type="number"]::-webkit-inner-spin-button,
345
+ input[type="number"]::-webkit-outer-spin-button {
346
+ height: auto;
347
+ }
348
+
349
+ /**
350
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
351
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
352
+ * (include `-moz` to future-proof).
353
+ */
354
+
355
+ input[type="search"] {
356
+ -webkit-appearance: textfield; /* 1 */
357
+ -moz-box-sizing: content-box;
358
+ -webkit-box-sizing: content-box; /* 2 */
359
+ box-sizing: content-box;
360
+ }
361
+
362
+ /**
363
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
364
+ * Safari (but not Chrome) clips the cancel button when the search input has
365
+ * padding (and `textfield` appearance).
366
+ */
367
+
368
+ input[type="search"]::-webkit-search-cancel-button,
369
+ input[type="search"]::-webkit-search-decoration {
370
+ -webkit-appearance: none;
371
+ }
372
+
373
+ /**
374
+ * Define consistent border, margin, and padding.
375
+ */
376
+
377
+ fieldset {
378
+ border: 1px solid #c0c0c0;
379
+ margin: 0 2px;
380
+ padding: 0.35em 0.625em 0.75em;
381
+ }
382
+
383
+ /**
384
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
385
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
386
+ */
387
+
388
+ legend {
389
+ border: 0; /* 1 */
390
+ padding: 0; /* 2 */
391
+ }
392
+
393
+ /**
394
+ * Remove default vertical scrollbar in IE 8/9/10/11.
395
+ */
396
+
397
+ textarea {
398
+ overflow: auto;
399
+ }
400
+
401
+ /**
402
+ * Don't inherit the `font-weight` (applied by a rule above).
403
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
404
+ */
405
+
406
+ optgroup {
407
+ font-weight: bold;
408
+ }
409
+
410
+ /* Tables
411
+ ========================================================================== */
412
+
413
+ /**
414
+ * Remove most spacing between table cells.
415
+ */
416
+
417
+ table {
418
+ border-collapse: collapse;
419
+ border-spacing: 0;
420
+ }
421
+
422
+ td,
423
+ th {
424
+ padding: 0;
425
+ }
@@ -0,0 +1,73 @@
1
+ //
2
+ // Scaffolding
3
+ // --------------------------------------------------
4
+
5
+ // Reset the box-sizing
6
+ * {
7
+ @include box-sizing(border-box);
8
+ }
9
+ *:before,
10
+ *:after {
11
+ @include box-sizing(border-box);
12
+ }
13
+
14
+
15
+ // Body reset
16
+ // -------------------------
17
+ html {
18
+ font-size: 100%;
19
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
20
+ }
21
+
22
+ body {
23
+ font-family: $font-family-base;
24
+ font-size: $font-size-base;
25
+ line-height: $line-height-base;
26
+ color: $text-color;
27
+ background-color: $background-color;
28
+ }
29
+
30
+ header{
31
+ height: 45px;
32
+ }
33
+
34
+ footer{
35
+
36
+ }
37
+
38
+ // Reset fonts for relevant elements
39
+ // -------------------------
40
+ input,
41
+ button,
42
+ select,
43
+ textarea {
44
+ font-family: inherit;
45
+ font-size: inherit;
46
+ line-height: inherit;
47
+ }
48
+
49
+
50
+ // Links
51
+ // -------------------------
52
+
53
+ a {
54
+ color: $link-color;
55
+ text-decoration: none;
56
+
57
+ &:hover,
58
+ &:focus {
59
+ color: $link-hover-color;
60
+ text-decoration: underline;
61
+ }
62
+
63
+ &:focus {
64
+ // @include tab-focus();
65
+ }
66
+ }
67
+
68
+
69
+ // Images
70
+ // -------------------------
71
+ img {
72
+ vertical-align: middle;
73
+ }
@@ -0,0 +1,60 @@
1
+ //
2
+ // Typography
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Headings
7
+ // -------------------------
8
+
9
+ h1, h2, h3, h4, h5, h6{
10
+ font-family: $heading-font-family;
11
+ font-weight: $heading-font-weight;
12
+ line-height: $heading-line-height;
13
+ color: $heading-color;
14
+
15
+ // margin-top: ($line-height-computed / 2);
16
+ // margin-bottom: ($line-height-computed / 2);
17
+
18
+ small{
19
+ font-weight: normal;
20
+ line-height: 1;
21
+ // color: $heading-small-color;
22
+ }
23
+ }
24
+
25
+ h1, h2, h3 {
26
+ small{
27
+ font-size: 65%;
28
+ }
29
+ }
30
+ h4, h5, h6 {
31
+ small{
32
+ font-size: 75%;
33
+ }
34
+ }
35
+
36
+ h1 { font-size: $font-size-h1; }
37
+ h2 { font-size: $font-size-h2; }
38
+ h3 { font-size: $font-size-h3; }
39
+ h4 { font-size: $font-size-h4; }
40
+ h5 { font-size: $font-size-h5; }
41
+ h6 { font-size: $font-size-h6; }
42
+
43
+
44
+ // Text style
45
+ // -------------------------
46
+
47
+ p{ margin: 0 0 ($line-height-computed / 2);}
48
+
49
+ small{ font-size: 85%; }
50
+
51
+ mark{
52
+ padding: .2em;
53
+ }
54
+
55
+ // Text align
56
+ // -------------------------
57
+ .text.left { text-align: left; }
58
+ .text.right { text-align: right; }
59
+ .text.center { text-align: center; }
60
+ .text.justify { text-align: justify; }
@@ -0,0 +1,64 @@
1
+ // Variables
2
+ // --------------------------------------------------
3
+
4
+
5
+ // Colors
6
+ // -------------------------
7
+
8
+ $gray-darker: #111 !default;
9
+ $gray-dark: #333 !default;
10
+ $gray: #666 !default;
11
+ $gray-light: #999 !default;
12
+ $gray-lighter: #eee !default;
13
+
14
+ $brand-primary: #428bca !default;
15
+ $brand-success: #5cb85c !default;
16
+ $brand-info: #5bc0de !default;
17
+ $brand-warning: #f0ad4e !default;
18
+ $brand-danger: #d9534f !default;
19
+
20
+ $background-color: #fff !default;
21
+
22
+ $text-color: $gray-dark !default;
23
+
24
+ $link-color: $brand-primary !default;
25
+
26
+ $link-hover-color: darken($link-color, 15%) !default;
27
+
28
+
29
+ // Font family, size
30
+ // -------------------------
31
+
32
+ $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
33
+
34
+ $font-family-serif: Georgia, "Times New Roman", Times, serif !default;
35
+
36
+ $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
37
+
38
+ $font-family-base: $font-family-sans-serif !default;
39
+
40
+ $font-size-base: 14px !default;
41
+ $font-size-large: ceil(($font-size-base * 1.28)) !default; // ~18px
42
+ $font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
43
+
44
+ $font-size-h1: floor(($font-size-base * 2.6)) !default; // ~36px
45
+ $font-size-h2: floor(($font-size-base * 2.28)) !default; // ~32px
46
+ $font-size-h3: ceil(($font-size-base * 1.7)) !default; // ~24px
47
+ $font-size-h4: ceil(($font-size-base * 1.28)) !default; // ~18px
48
+ $font-size-h5: $font-size-base !default;
49
+ $font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
50
+
51
+
52
+ $line-height-base: 1.428571429 !default; // 20/14
53
+
54
+ $line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
55
+
56
+
57
+ // Heading
58
+ // -------------------------
59
+
60
+ $heading-font-family: inherit !default;
61
+ $heading-font-weight: 500 !default;
62
+ $heading-line-height: 1.1 !default;
63
+ $heading-color: inherit !default;
64
+
@@ -0,0 +1,10 @@
1
+ // Core variables and mixins
2
+ @import "mice/variables";
3
+ @import "mice/mixins";
4
+
5
+ // Reset and dependencies
6
+ @import "mice/normalize";
7
+
8
+ // Base CSS
9
+ @import "mice/scaffolding";
10
+ @import "mice/typography";
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mice
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - miclle
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ description: Mice is semantic front-end framework.
28
+ email:
29
+ - miclle.zheng@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - Gemfile
35
+ - Gemfile.lock
36
+ - LICENSE
37
+ - README.md
38
+ - Rakefile
39
+ - lib/mice.rb
40
+ - lib/mice/engine.rb
41
+ - lib/mice/version.rb
42
+ - vendor/assets/javascripts/mice.js
43
+ - vendor/assets/javascripts/mice/jquery.email-autocomplete.js
44
+ - vendor/assets/stylesheets/mice.scss
45
+ - vendor/assets/stylesheets/mice/_mixins.scss
46
+ - vendor/assets/stylesheets/mice/_normalize.scss
47
+ - vendor/assets/stylesheets/mice/_scaffolding.scss
48
+ - vendor/assets/stylesheets/mice/_typography.scss
49
+ - vendor/assets/stylesheets/mice/_variables.scss
50
+ homepage: http://miclle.com
51
+ licenses:
52
+ - MIT
53
+ metadata: {}
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 2.2.2
71
+ signing_key:
72
+ specification_version: 4
73
+ summary: Front-end framework.
74
+ test_files: []