skyblue_rails 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/assets/fonts/pe-icon/Pe-icon-7-stroke.eot +0 -0
  4. data/assets/fonts/pe-icon/Pe-icon-7-stroke.svg +212 -0
  5. data/assets/fonts/pe-icon/Pe-icon-7-stroke.ttf +0 -0
  6. data/assets/fonts/pe-icon/Pe-icon-7-stroke.woff +0 -0
  7. data/assets/images/select-webkit-backup.png +0 -0
  8. data/assets/images/select-webkit.png +0 -0
  9. data/assets/javascripts/skyblue/ie.js +1 -0
  10. data/assets/javascripts/skyblue/ie/html5shiv.js +322 -0
  11. data/assets/javascripts/skyblue/ie/respond.src.js +237 -0
  12. data/assets/stylesheets/skyblue.scss +38 -0
  13. data/assets/stylesheets/skyblue/_buttons.scss +136 -0
  14. data/assets/stylesheets/skyblue/_forms.scss +221 -0
  15. data/assets/stylesheets/skyblue/_grid.scss +78 -0
  16. data/assets/stylesheets/skyblue/_helpers.scss +72 -0
  17. data/assets/stylesheets/skyblue/_icons.scss +633 -0
  18. data/assets/stylesheets/skyblue/_main.scss +15 -0
  19. data/assets/stylesheets/skyblue/_mixins.scss +46 -0
  20. data/assets/stylesheets/skyblue/_reset.scss +77 -0
  21. data/assets/stylesheets/skyblue/_tables.scss +174 -0
  22. data/assets/stylesheets/skyblue/_typography.scss +162 -0
  23. data/assets/stylesheets/skyblue/_variables.scss +100 -0
  24. data/lib/skyblue/rails.rb +20 -0
  25. data/lib/skyblue/rails/railtie.rb +13 -0
  26. data/lib/skyblue/rails/version.rb +5 -0
  27. data/lib/skyblue_rails.rb +2 -0
  28. data/readme.md +58 -0
  29. data/spec/dummy/README.rdoc +28 -0
  30. data/spec/dummy/Rakefile +6 -0
  31. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  32. data/spec/dummy/app/assets/stylesheets/application.scss +15 -0
  33. data/spec/dummy/app/controllers/application_controller.rb +7 -0
  34. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  35. data/spec/dummy/app/views/application/icons_test.html.erb +5 -0
  36. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  37. data/spec/dummy/bin/bundle +3 -0
  38. data/spec/dummy/bin/rails +4 -0
  39. data/spec/dummy/bin/rake +4 -0
  40. data/spec/dummy/bin/setup +29 -0
  41. data/spec/dummy/config.ru +4 -0
  42. data/spec/dummy/config/application.rb +26 -0
  43. data/spec/dummy/config/boot.rb +5 -0
  44. data/spec/dummy/config/database.yml +25 -0
  45. data/spec/dummy/config/environment.rb +5 -0
  46. data/spec/dummy/config/environments/development.rb +41 -0
  47. data/spec/dummy/config/environments/production.rb +79 -0
  48. data/spec/dummy/config/environments/test.rb +42 -0
  49. data/spec/dummy/config/initializers/assets.rb +11 -0
  50. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  51. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  52. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/spec/dummy/config/initializers/inflections.rb +16 -0
  54. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  55. data/spec/dummy/config/initializers/session_store.rb +3 -0
  56. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  57. data/spec/dummy/config/locales/en.yml +23 -0
  58. data/spec/dummy/config/routes.rb +3 -0
  59. data/spec/dummy/config/secrets.yml +22 -0
  60. data/spec/dummy/db/development.sqlite3 +0 -0
  61. data/spec/dummy/db/schema.rb +16 -0
  62. data/spec/dummy/db/test.sqlite3 +0 -0
  63. data/spec/dummy/log/test.log +49 -0
  64. data/spec/dummy/public/404.html +67 -0
  65. data/spec/dummy/public/422.html +67 -0
  66. data/spec/dummy/public/500.html +66 -0
  67. data/spec/dummy/public/favicon.ico +0 -0
  68. data/spec/skyblue/rails/railtie_spec.rb +43 -0
  69. data/spec/skyblue/rails_spec.rb +17 -0
  70. data/spec/spec_helper.rb +16 -0
  71. metadata +241 -0
@@ -0,0 +1,237 @@
1
+ /*! Respond.js v1.4.2: min/max-width media query polyfill
2
+ * Copyright 2014 Scott Jehl
3
+ * Licensed under MIT
4
+ * http://j.mp/respondjs */
5
+
6
+ /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
7
+ /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
8
+ (function(w) {
9
+ "use strict";
10
+ w.matchMedia = w.matchMedia || function(doc, undefined) {
11
+ var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
12
+ div.id = "mq-test-1";
13
+ div.style.cssText = "position:absolute;top:-100em";
14
+ fakeBody.style.background = "none";
15
+ fakeBody.appendChild(div);
16
+ return function(q) {
17
+ div.innerHTML = '&shy;<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
18
+ docElem.insertBefore(fakeBody, refNode);
19
+ bool = div.offsetWidth === 42;
20
+ docElem.removeChild(fakeBody);
21
+ return {
22
+ matches: bool,
23
+ media: q
24
+ };
25
+ };
26
+ }(w.document);
27
+ })(this);
28
+
29
+ (function(w) {
30
+ "use strict";
31
+ var respond = {};
32
+ w.respond = respond;
33
+ respond.update = function() {};
34
+ var requestQueue = [], xmlHttp = function() {
35
+ var xmlhttpmethod = false;
36
+ try {
37
+ xmlhttpmethod = new w.XMLHttpRequest();
38
+ } catch (e) {
39
+ xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
40
+ }
41
+ return function() {
42
+ return xmlhttpmethod;
43
+ };
44
+ }(), ajax = function(url, callback) {
45
+ var req = xmlHttp();
46
+ if (!req) {
47
+ return;
48
+ }
49
+ req.open("GET", url, true);
50
+ req.onreadystatechange = function() {
51
+ if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
52
+ return;
53
+ }
54
+ callback(req.responseText);
55
+ };
56
+ if (req.readyState === 4) {
57
+ return;
58
+ }
59
+ req.send(null);
60
+ }, isUnsupportedMediaQuery = function(query) {
61
+ return query.replace(respond.regex.minmaxwh, "").match(respond.regex.other);
62
+ };
63
+ respond.ajax = ajax;
64
+ respond.queue = requestQueue;
65
+ respond.unsupportedmq = isUnsupportedMediaQuery;
66
+ respond.regex = {
67
+ media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
68
+ keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
69
+ comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
70
+ urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
71
+ findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
72
+ only: /(only\s+)?([a-zA-Z]+)\s?/,
73
+ minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
74
+ maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
75
+ minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,
76
+ other: /\([^\)]*\)/g
77
+ };
78
+ respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
79
+ if (respond.mediaQueriesSupported) {
80
+ return;
81
+ }
82
+ var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
83
+ var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
84
+ div.style.cssText = "position:absolute;font-size:1em;width:1em";
85
+ if (!body) {
86
+ body = fakeUsed = doc.createElement("body");
87
+ body.style.background = "none";
88
+ }
89
+ docElem.style.fontSize = "100%";
90
+ body.style.fontSize = "100%";
91
+ body.appendChild(div);
92
+ if (fakeUsed) {
93
+ docElem.insertBefore(body, docElem.firstChild);
94
+ }
95
+ ret = div.offsetWidth;
96
+ if (fakeUsed) {
97
+ docElem.removeChild(body);
98
+ } else {
99
+ body.removeChild(div);
100
+ }
101
+ docElem.style.fontSize = originalHTMLFontSize;
102
+ if (originalBodyFontSize) {
103
+ body.style.fontSize = originalBodyFontSize;
104
+ }
105
+ ret = eminpx = parseFloat(ret);
106
+ return ret;
107
+ }, applyMedia = function(fromResize) {
108
+ var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
109
+ if (fromResize && lastCall && now - lastCall < resizeThrottle) {
110
+ w.clearTimeout(resizeDefer);
111
+ resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
112
+ return;
113
+ } else {
114
+ lastCall = now;
115
+ }
116
+ for (var i in mediastyles) {
117
+ if (mediastyles.hasOwnProperty(i)) {
118
+ var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
119
+ if (!!min) {
120
+ min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
121
+ }
122
+ if (!!max) {
123
+ max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
124
+ }
125
+ if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
126
+ if (!styleBlocks[thisstyle.media]) {
127
+ styleBlocks[thisstyle.media] = [];
128
+ }
129
+ styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
130
+ }
131
+ }
132
+ }
133
+ for (var j in appendedEls) {
134
+ if (appendedEls.hasOwnProperty(j)) {
135
+ if (appendedEls[j] && appendedEls[j].parentNode === head) {
136
+ head.removeChild(appendedEls[j]);
137
+ }
138
+ }
139
+ }
140
+ appendedEls.length = 0;
141
+ for (var k in styleBlocks) {
142
+ if (styleBlocks.hasOwnProperty(k)) {
143
+ var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
144
+ ss.type = "text/css";
145
+ ss.media = k;
146
+ head.insertBefore(ss, lastLink.nextSibling);
147
+ if (ss.styleSheet) {
148
+ ss.styleSheet.cssText = css;
149
+ } else {
150
+ ss.appendChild(doc.createTextNode(css));
151
+ }
152
+ appendedEls.push(ss);
153
+ }
154
+ }
155
+ }, translate = function(styles, href, media) {
156
+ var qs = styles.replace(respond.regex.comments, "").replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
157
+ href = href.substring(0, href.lastIndexOf("/"));
158
+ var repUrls = function(css) {
159
+ return css.replace(respond.regex.urls, "$1" + href + "$2$3");
160
+ }, useMedia = !ql && media;
161
+ if (href.length) {
162
+ href += "/";
163
+ }
164
+ if (useMedia) {
165
+ ql = 1;
166
+ }
167
+ for (var i = 0; i < ql; i++) {
168
+ var fullq, thisq, eachq, eql;
169
+ if (useMedia) {
170
+ fullq = media;
171
+ rules.push(repUrls(styles));
172
+ } else {
173
+ fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
174
+ rules.push(RegExp.$2 && repUrls(RegExp.$2));
175
+ }
176
+ eachq = fullq.split(",");
177
+ eql = eachq.length;
178
+ for (var j = 0; j < eql; j++) {
179
+ thisq = eachq[j];
180
+ if (isUnsupportedMediaQuery(thisq)) {
181
+ continue;
182
+ }
183
+ mediastyles.push({
184
+ media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
185
+ rules: rules.length - 1,
186
+ hasquery: thisq.indexOf("(") > -1,
187
+ minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
188
+ maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
189
+ });
190
+ }
191
+ }
192
+ applyMedia();
193
+ }, makeRequests = function() {
194
+ if (requestQueue.length) {
195
+ var thisRequest = requestQueue.shift();
196
+ ajax(thisRequest.href, function(styles) {
197
+ translate(styles, thisRequest.href, thisRequest.media);
198
+ parsedSheets[thisRequest.href] = true;
199
+ w.setTimeout(function() {
200
+ makeRequests();
201
+ }, 0);
202
+ });
203
+ }
204
+ }, ripCSS = function() {
205
+ for (var i = 0; i < links.length; i++) {
206
+ var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
207
+ if (!!href && isCSS && !parsedSheets[href]) {
208
+ if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
209
+ translate(sheet.styleSheet.rawCssText, href, media);
210
+ parsedSheets[href] = true;
211
+ } else {
212
+ if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
213
+ if (href.substring(0, 2) === "//") {
214
+ href = w.location.protocol + href;
215
+ }
216
+ requestQueue.push({
217
+ href: href,
218
+ media: media
219
+ });
220
+ }
221
+ }
222
+ }
223
+ }
224
+ makeRequests();
225
+ };
226
+ ripCSS();
227
+ respond.update = ripCSS;
228
+ respond.getEmValue = getEmValue;
229
+ function callMedia() {
230
+ applyMedia(true);
231
+ }
232
+ if (w.addEventListener) {
233
+ w.addEventListener("resize", callMedia, false);
234
+ } else if (w.attachEvent) {
235
+ w.attachEvent("onresize", callMedia);
236
+ }
237
+ })(this);
@@ -0,0 +1,38 @@
1
+ /*
2
+ *
3
+ * SkyBlue Sass by Stanko
4
+ *
5
+ * Built and maintained with a lots of love
6
+ * http://null-object.com
7
+ *
8
+ */
9
+
10
+ // Core variables and mixins
11
+ @import "skyblue/variables"; // Modify this for custom colors, font-sizes, etc
12
+ @import "skyblue/mixins";
13
+
14
+
15
+ // CSS Reset
16
+ @import "skyblue/reset";
17
+
18
+
19
+ // Grid system and page structure
20
+ @import "skyblue/grid";
21
+
22
+
23
+ // Base CSS
24
+ @import "skyblue/typography";
25
+ @import "skyblue/buttons";
26
+ @import "skyblue/forms";
27
+ @import "skyblue/tables";
28
+
29
+
30
+ // Helpers at the end to override
31
+ @import "skyblue/helpers";
32
+
33
+ // Awesome Stroke Icons
34
+ // http://themes-pixeden.com/font-demos/7-stroke/index.html
35
+ @import "skyblue/icons";
36
+
37
+ // Main
38
+ @import "skyblue/main";
@@ -0,0 +1,136 @@
1
+ button, input[type="submit"], input[type="button"]{
2
+ font-family: $font-family;
3
+ font-weight: $font-weight;
4
+ font-size: 1em;
5
+ -webkit-appearance: none;
6
+ -webkit-font-smoothing: antialiased;
7
+ }
8
+
9
+ @mixin generate-btn($background, $color, $active-color){
10
+ background: $background;
11
+ color: $color;
12
+
13
+ &:hover{
14
+ background-color: $background - $color-diff;
15
+ color: $active-color;
16
+ }
17
+ &:active{
18
+ background-color: $background - $color-diff*2;
19
+ color: $active-color;
20
+ top: 1px;
21
+ position: relative;
22
+ }
23
+ }
24
+
25
+ @mixin generate-empty-btn($border, $color){
26
+ border: 2px solid $border;
27
+ color: $color;
28
+ background: none;
29
+
30
+ &:hover{
31
+ color: $color - $color-diff;
32
+ border-color: $border - $color-diff;
33
+ background: none;
34
+ }
35
+ &:active{
36
+ color: $color - $color-diff*2;
37
+ border-color: $border - $color-diff*2;
38
+ background: none;
39
+ }
40
+ }
41
+
42
+ .btn{
43
+ display: inline-block;
44
+ min-width: 120px;
45
+ padding: 10px 25px;
46
+ margin-bottom: $font-size;
47
+ border: none;
48
+ border-radius: $border-radius;
49
+ font-size: 1em;
50
+ line-height: 1.4em;
51
+ text-align: center;
52
+ text-decoration: none;
53
+ transition: border-color $transition-time, background-color $transition-time, color $transition-time;
54
+
55
+ // SMALL BUTTON
56
+ &.btn-small{
57
+ padding: 5px 15px;
58
+ min-width: 30px;
59
+ font-size: 0.8em;
60
+ line-height: 1.2em;
61
+ }
62
+ // BIG BUTTON
63
+ &.btn-big{
64
+ padding: 12px 45px;
65
+ min-width: 200px;
66
+ font-size: 1.4em;
67
+ }
68
+
69
+ @include generate-btn($main-color, #fff, #fff);
70
+
71
+
72
+ // SUCCESS BUTTON
73
+ &.btn-success{
74
+ @include generate-btn($success-color, #fff, #fff);
75
+ }
76
+
77
+ // ERROR BUTTON
78
+ &.btn-error{
79
+ @include generate-btn($error-color, #fff, #fff);
80
+ }
81
+
82
+ // WARNING BUTTON
83
+ &.btn-warning{
84
+ @include generate-btn($warning-color, #fff, #fff);
85
+ }
86
+
87
+ // LIGHT BUTTON
88
+ &.btn-light{
89
+ @include generate-btn($light-color, $gray3, #fff);
90
+ }
91
+
92
+ // DARK BUTTON
93
+ &.btn-dark{
94
+ @include generate-btn($dark-color, #fff, #fff);
95
+ }
96
+
97
+
98
+
99
+ // EMPTY BUTTONS
100
+ &.btn-empty{
101
+ background: transparent;
102
+ border: 2px solid $main-color;
103
+ border-radius: $big-border-radius;
104
+ padding: 8px 25px;
105
+
106
+ @include generate-empty-btn($main-color, $main-color);
107
+
108
+
109
+ // SUCCESS BUTTON
110
+ &.btn-success{
111
+ @include generate-empty-btn($success-color, $success-color);
112
+ }
113
+
114
+ // ERROR BUTTON
115
+ &.btn-error{
116
+ @include generate-empty-btn($error-color, $error-color);
117
+ }
118
+
119
+ // WARNING BUTTON
120
+ &.btn-warning{
121
+ @include generate-empty-btn($warning-color, $warning-color);
122
+ }
123
+
124
+ // LIGHT BUTTON
125
+ &.btn-light{
126
+ @include generate-empty-btn($gray2, $gray3);
127
+ }
128
+
129
+ // DARK BUTTON
130
+ &.btn-dark{
131
+ @include generate-empty-btn($dark-color, $dark-color);
132
+ }
133
+ }
134
+
135
+
136
+ }
@@ -0,0 +1,221 @@
1
+ $inputs:
2
+ 'input[type="text"],
3
+ input[type="password"],
4
+ input[type="date"],
5
+ input[type="datetime"],
6
+ input[type="email"],
7
+ input[type="number"],
8
+ input[type="search"],
9
+ input[type="tel"],
10
+ input[type="time"],
11
+ input[type="url"],
12
+ select,
13
+ textarea';
14
+
15
+
16
+ #{$inputs} {
17
+ &.form-control{
18
+ height: 2.625em;
19
+ width: 100%;
20
+ max-width: 100%;
21
+ padding: 0.5em;
22
+ margin-bottom: $font-size;
23
+ font-family: $font-family;
24
+ font-weight: $font-weight;
25
+ color: $gray5;
26
+ font-size: 1em;
27
+ border: 2px solid $gray2;
28
+ border-radius: $border-radius;
29
+
30
+ -webkit-font-smoothing: antialiased;
31
+ -webkit-appearance: none;
32
+
33
+ transition: border-color $transition-time, color $transition-time;
34
+
35
+ &:focus{
36
+ border: 2px solid $main-color;
37
+ color: $gray7;
38
+ outline: none;
39
+ }
40
+
41
+
42
+ &.error, .error &{
43
+ border-color: $error-color;
44
+ }
45
+ &.warning, .warning &{
46
+ border-color: $warning-color;
47
+ }
48
+ &.success, .success &{
49
+ border-color: $success-color;
50
+ }
51
+ }
52
+ }
53
+
54
+ textarea{
55
+ height: auto;
56
+ min-height: 100px;
57
+ line-height: $line-height;
58
+ }
59
+ select{
60
+ -webkit-appearance: none;
61
+ -moz-appearance: none;
62
+ }
63
+
64
+ // Hack for webkit only
65
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
66
+ select{
67
+ @include select();
68
+ }
69
+ }
70
+ // Hack for firefox
71
+ @-moz-document url-prefix() {
72
+ select{
73
+ @include select();
74
+ }
75
+ }
76
+
77
+ label{
78
+ display: block;
79
+ margin-bottom: 0.5em;
80
+ line-height: 1.5em;
81
+
82
+ &.error, .error &{
83
+ color: $error-color;
84
+ }
85
+ &.warning, .warning &{
86
+ color: $warning-color;
87
+ }
88
+ &.success, .success &{
89
+ color: $success-color;
90
+ }
91
+ }
92
+
93
+ input[type="checkbox"],
94
+ input[type="radio"]{
95
+
96
+ }
97
+
98
+
99
+ @include placeholder($gray3);
100
+
101
+ .form{
102
+ .checkbox-group, .radio-group{
103
+ margin-bottom: $font-size;
104
+ }
105
+ &.form-horizontal{
106
+ label{
107
+ display: inline-block;
108
+ width: 200px;
109
+ max-width: 100%;
110
+ font-size: 1em;
111
+ vertical-align: top;
112
+ }
113
+
114
+ .checkbox-group, .radio-group{
115
+ display: inline-block;
116
+ width: 200px;
117
+ max-width: 100%;
118
+ label{
119
+ display: block;
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+
126
+ .fancy-radio,
127
+ .fancy-checkbox{
128
+ position: relative;
129
+ cursor: pointer;
130
+
131
+ input{
132
+ opacity: 0;
133
+ position: absolute;
134
+ }
135
+
136
+ span:before,
137
+ span:after{
138
+ box-sizing: border-box;
139
+ content: '';
140
+ display: block;
141
+ position: absolute;
142
+ transition: all 0.25s;
143
+ }
144
+ }
145
+
146
+ .fancy-checkbox{
147
+ padding-left: $checkbox-width + 6px;
148
+
149
+ span:before{
150
+ width: $checkbox-width;
151
+ height: $checkbox-height;
152
+ border-radius: $checkbox-height / 2;
153
+ top: $checkbox-top;
154
+ left: 0;
155
+ background: $checkbox-bg;
156
+ border: 1px solid $checkbox-bg;
157
+ }
158
+ span:after{
159
+ width: $checkbox-circle-size;
160
+ height: $checkbox-circle-size;
161
+ border-radius: $checkbox-circle-size / 2;
162
+ background: #fff;
163
+ top: $checkbox-top + 1;
164
+ left: 1px;
165
+ }
166
+
167
+ input:checked + span{
168
+ &:after{
169
+ left: $checkbox-width - $checkbox-circle-size - 1;
170
+ }
171
+ &:before{
172
+ background: $checkbox-checked-bg;
173
+ border: 1px solid $checkbox-checked-bg;
174
+ }
175
+ }
176
+
177
+ input:focus + span:before{
178
+ border: 1px solid darken($checkbox-bg, 20);
179
+ }
180
+ input:focus:checked + span:before{
181
+ border: 1px solid darken($checkbox-checked-bg, 20);
182
+ }
183
+ }
184
+
185
+ .fancy-radio{
186
+ padding-left: $radio-size + 8px;
187
+
188
+ span:before{
189
+ width: $radio-size;
190
+ height: $radio-size;
191
+ border-radius: 50%;
192
+ top: $radio-top;
193
+ left: 0;
194
+ background: #fff;
195
+ border: 1px solid $radio-border-color;
196
+ }
197
+ span:after{
198
+ border-radius: 50%;
199
+ background: #fff;
200
+ top: $radio-circle-top;
201
+ left: $radio-circle-left;
202
+ width: 0;
203
+ height: 0;
204
+ }
205
+
206
+ input:checked + span{
207
+ &:after{
208
+ width: $radio-circle-size;
209
+ height: $radio-circle-size;
210
+ top: $radio-circle-active-top;
211
+ left: $radio-circle-active-left;
212
+ }
213
+ &:before{
214
+ background: $radio-checked-bg;
215
+ }
216
+ }
217
+
218
+ input:focus + span:before{
219
+ border: 1px solid darken($radio-checked-bg, 20);
220
+ }
221
+ }