evil-front 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/ChangeLog.md +3 -0
  4. data/LICENSE +20 -0
  5. data/Rakefile +13 -0
  6. data/evil-front.gemspec +27 -0
  7. data/lib/assets/javascripts/evil-front/after.js +7 -0
  8. data/lib/assets/javascripts/evil-front/ajax.js +61 -0
  9. data/lib/assets/javascripts/evil-front/core.js +13 -0
  10. data/lib/assets/javascripts/evil-front/detect-3d.js +5 -0
  11. data/lib/assets/javascripts/evil-front/every.js +7 -0
  12. data/lib/assets/javascripts/evil-front/http.js +29 -0
  13. data/lib/assets/javascripts/evil-front/jquery.js +43 -0
  14. data/lib/assets/javascripts/evil-front/links.js +10 -0
  15. data/lib/assets/javascripts/evil-front/outside.js +40 -0
  16. data/lib/assets/javascripts/evil-front/queue.js +43 -0
  17. data/lib/assets/javascripts/evil-front/tappable.js +46 -0
  18. data/lib/assets/javascripts/evil-front/transform3d.js +38 -0
  19. data/lib/assets/javascripts/evil-front.js +7 -0
  20. data/lib/assets/stylesheets/evil-front/clearfix.sass +8 -0
  21. data/lib/assets/stylesheets/evil-front/colors.sass +11 -0
  22. data/lib/assets/stylesheets/evil-front/easings.sass +35 -0
  23. data/lib/assets/stylesheets/evil-front/flying-quotes.sass +6 -0
  24. data/lib/assets/stylesheets/evil-front/height.sass +9 -0
  25. data/lib/assets/stylesheets/evil-front/import-ruble.sass +42 -0
  26. data/lib/assets/stylesheets/evil-front/media.sass +25 -0
  27. data/lib/assets/stylesheets/evil-front/no-hover.sass +17 -0
  28. data/lib/assets/stylesheets/evil-front/no-tap-highlight.sass +9 -0
  29. data/lib/assets/stylesheets/evil-front/reset.sass +31 -0
  30. data/lib/assets/stylesheets/evil-front/size.sass +8 -0
  31. data/lib/assets/stylesheets/evil-front/sticky-footer.sass +20 -0
  32. data/lib/assets/stylesheets/evil-front/stroke-text.sass +8 -0
  33. data/lib/assets/stylesheets/evil-front/styled-taps.sass +11 -0
  34. data/lib/assets/stylesheets/evil-front/to-px.sass +6 -0
  35. data/lib/assets/stylesheets/evil-front.sass +18 -0
  36. data/lib/evil-front/helpers/capitalize_first.rb +8 -0
  37. data/lib/evil-front/helpers/disable_mobile_zoom.rb +13 -0
  38. data/lib/evil-front/helpers/flying_quote.rb +20 -0
  39. data/lib/evil-front/helpers/head_content.rb +10 -0
  40. data/lib/evil-front/helpers/head_tag.rb +26 -0
  41. data/lib/evil-front/helpers/ruble.rb +15 -0
  42. data/lib/evil-front/helpers/russian_typograph.rb +21 -0
  43. data/lib/evil-front/helpers/standard_assets.rb +13 -0
  44. data/lib/evil-front/helpers/tel.rb +12 -0
  45. data/lib/evil-front/helpers/title.rb +14 -0
  46. data/lib/evil-front/helpers/title_tag.rb +27 -0
  47. data/lib/evil-front/helpers.rb +25 -0
  48. data/lib/evil-front/russian.rb +84 -0
  49. data/lib/evil-front/slim.rb +6 -0
  50. data/lib/evil-front/version.rb +3 -0
  51. data/lib/evil-front.rb +30 -0
  52. data/spec/helpers_spec.rb +98 -0
  53. data/spec/russian_spec.rb +100 -0
  54. data/spec/sass/empty.txt +0 -0
  55. data/spec/sass/inline-ruble.sass +3 -0
  56. data/spec/sass/load.sass +7 -0
  57. data/spec/sass/media.sass +9 -0
  58. data/spec/sass/ruble.sass +3 -0
  59. data/spec/sass/size.sass +10 -0
  60. data/spec/sass_spec.rb +75 -0
  61. data/spec/spec_helper.rb +3 -0
  62. data/vendor/assets/fonts/evil-front/alsrubl-arial-bold.woff +0 -0
  63. data/vendor/assets/fonts/evil-front/alsrubl-arial-bolditalic.woff +0 -0
  64. data/vendor/assets/fonts/evil-front/alsrubl-arial-italic.woff +0 -0
  65. data/vendor/assets/fonts/evil-front/alsrubl-arial-regular.woff +0 -0
  66. metadata +220 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df26866b8b19e4d3f42c79c980310ff044a36f93
4
+ data.tar.gz: 1707febaae47a5ba06ec9a5b55d19c4839859223
5
+ SHA512:
6
+ metadata.gz: 2b2bf25a92aff66e2b38759e21ca0eb6a60f3ef04c1f2120577671dd9636298e59cebc6f39344e720f469bed21ca9710dffda75c223dc4789628959e4d32067d
7
+ data.tar.gz: a307a12384256e1625d99b8ebf92403c65d608e13217b43ade5bf57a4b963f311b28314f2c809d2463da74c8f4adb7c598868440e151fbb76a64a42bcb78860a
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --format documentation --colour
data/ChangeLog.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 0.1 “Hellespontus Montes”
2
+
3
+ * Initial release.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+
3
+ require 'bundler/setup'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ require 'rspec/core/rake_task'
7
+ RSpec::Core::RakeTask.new
8
+ task default: :spec
9
+
10
+ task :clobber_package do
11
+ rm_r 'pkg' rescue nil
12
+ end
13
+ task clobber: [:clobber_package]
@@ -0,0 +1,27 @@
1
+ require File.expand_path('../lib/evil-front/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.platform = Gem::Platform::RUBY
5
+ s.name = 'evil-front'
6
+ s.version = EvilFront::VERSION
7
+ s.date = Time.now.strftime('%Y-%m-%d')
8
+ s.summary = 'Helpers, Sass mixins and JS shortcuts from Evil Martians'
9
+
10
+ s.author = 'Andrey Sitnik'
11
+ s.email = 'andrey@sitnik.ru'
12
+ s.homepage = 'https://github.com/ai/evil-front'
13
+ s.license = 'MIT'
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.extra_rdoc_files = ['LICENSE']
17
+ s.require_path = 'lib'
18
+
19
+ s.add_dependency 'i18n', '>= 0'
20
+ s.add_dependency 'slim', '>= 1.3.9'
21
+ s.add_dependency 'sass', '>= 3.2.9'
22
+ s.add_dependency 'nokogiri', '>= 1'
23
+ s.add_dependency 'sprockets', '>= 1'
24
+ s.add_dependency 'unicode_utils', '>= 1.4'
25
+ s.add_dependency 'rails-sass-images', '>= 0.3'
26
+ s.add_dependency 'standalone_typograf', '>= 3.0.1'
27
+ end
@@ -0,0 +1,7 @@
1
+ // Alternate syntax for `setTimeout`, to be more useful in CoffeeScript.
2
+ //
3
+ // after 1000, ->
4
+ // addSecond()
5
+ window.after = function (ms, callback) {
6
+ return setTimeout(callback, ms);
7
+ };
@@ -0,0 +1,61 @@
1
+ //= evil-front/jquery
2
+
3
+ // Change selected form to be sent by AJAX.
4
+ //
5
+ // $('form').evil.ajax
6
+ // success: -> message('success')
7
+ // error: (text) -> message('error' + text)
8
+ //
9
+ // While AJAX is loading, form will has `is-submitting` class.
10
+ // Don’t forget to show loader.
11
+ evil.$.extend('ajax', function (opts) {
12
+ if ( !opts ) {
13
+ opts = { };
14
+ }
15
+
16
+ this.submit(function (event) {
17
+ if ( event.isPropagationStopped() ) {
18
+ return false;
19
+ }
20
+
21
+ var form = $(this);
22
+
23
+ if ( form.hasClass('is-submitting') ) {
24
+ return false;
25
+ }
26
+ form.addClass('is-submitting');
27
+
28
+ var check = true;
29
+ if ( opts.submitting ) {
30
+ check = opts.submitting(form);
31
+ }
32
+ if ( !check ) {
33
+ return false;
34
+ }
35
+
36
+ $.ajax({
37
+ url: form.attr('action'),
38
+ type: form.attr('method').toUpperCase(),
39
+ data: form.serialize(),
40
+ success: function (data) {
41
+ if ( opts.success ) {
42
+ opts.success(data, form);
43
+ }
44
+ },
45
+ error: function (e) {
46
+ if ( e.status == 500 ) {
47
+ if ( opts.serverError ) {
48
+ opts.serverError(form);
49
+ }
50
+ } else if ( opts.error ) {
51
+ opts.error(e.responseText, form);
52
+ }
53
+ },
54
+ complete: function () {
55
+ form.removeClass('is-submitting');
56
+ }
57
+ });
58
+
59
+ return false;
60
+ });
61
+ });
@@ -0,0 +1,13 @@
1
+ // Add global `evil` namespace and common shortcuts.
2
+
3
+ if ( !window.evil ) {
4
+ window.evil = { };
5
+ }
6
+
7
+ evil.win = $(window),
8
+ evil.doc = $(document),
9
+ evil.body = null;
10
+
11
+ evil.doc.ready(function() {
12
+ evil.body = $('body');
13
+ });
@@ -0,0 +1,5 @@
1
+ //= require evil-front/transform3d
2
+
3
+ // Detect support 3D transform and add `transform3d` or `transform2s` class
4
+ // to body.
5
+ evil.transform3d.init();
@@ -0,0 +1,7 @@
1
+ // Alternate syntax for `setInterval`, to be more useful in CoffeeScript.
2
+ //
3
+ // every 1000, ->
4
+ // addSecond()
5
+ window.every = function (ms, callback) {
6
+ return setInterval(callback, ms);
7
+ };
@@ -0,0 +1,29 @@
1
+ //= require evil-front/core
2
+ // Add `evil.patch`, `evil.del`, `evil.put`, `evil.post` to send AJAX request
3
+ // with RESTful HTTP verb by Rails X-HTTP-Method-Override header
4
+ // and with CSRF token.
5
+
6
+ (function($) {
7
+ var props = { patch: 'PATCH', put: 'PUT', del: 'DELETE', post: 'POST' }
8
+ $.each(props, function(prop, method) {
9
+ evil[prop] = function(url, data, callback, type) {
10
+ if ($.isFunction(data)) {
11
+ type = type || callback;
12
+ callback = data;
13
+ data = { };
14
+ }
15
+
16
+ return $.ajax({
17
+ headers: {
18
+ 'X-HTTP-Method-Override': method,
19
+ 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
20
+ },
21
+ type: 'POST',
22
+ url: url,
23
+ data: data,
24
+ success: callback,
25
+ dataType: type
26
+ });
27
+ }
28
+ })
29
+ })(jQuery);
@@ -0,0 +1,43 @@
1
+ //= require evil-front/core
2
+
3
+ (function ($) {
4
+
5
+ // Create namespace for jQuery
6
+ evil.jquery = function(global, namespace) {
7
+ // Namespace inside jQuery.
8
+ global.$ = function (nodes) {
9
+ this.nodes = nodes;
10
+ };
11
+
12
+ // Syntax sugar to add own method to `$.fn.evil`.
13
+ global.$.extend = function (name, value) {
14
+ if ( $.isPlainObject(name) ) {
15
+ for ( key in name ) {
16
+ global.$.extend(key, name[key]);
17
+ }
18
+ return;
19
+ }
20
+
21
+ if ( $.isFunction(value) ) {
22
+ var callback = value;
23
+ value = function () {
24
+ return callback.apply(this.nodes, arguments);
25
+ };
26
+ }
27
+ this.prototype[name] = value;
28
+ };
29
+
30
+ // Hack to add `$.fn.evil` namespace.
31
+ var originaljQuery = $.fn.init;
32
+ $.fn.init = function () {
33
+ nodes = originaljQuery.apply(this, arguments);
34
+ nodes[namespace] = new global.$(nodes);
35
+ return nodes;
36
+ };
37
+ $.fn.init.prototype = originaljQuery.prototype;
38
+ };
39
+
40
+ // Create `evil.$` namespace.
41
+ evil.jquery(evil, 'evil');
42
+
43
+ })(jQuery);
@@ -0,0 +1,10 @@
1
+ //= require evil-front/core
2
+ // Prevent default in AJAX link with only # in href
3
+
4
+ evil.doc.ready(function() {
5
+ evil.body.on('click', 'a', function (e) {
6
+ if ( $(this).attr('href') == '#' ) {
7
+ e.preventDefault();
8
+ }
9
+ });
10
+ })
@@ -0,0 +1,40 @@
1
+ //= require evil-front/jquery
2
+
3
+ (function() {
4
+ evil.$.extend('outside', function (callback) {
5
+ var parent = this;
6
+
7
+ var event = function(e) {
8
+ var el = $(e.target);
9
+ if ( !el.closest(parent).length ) {
10
+ callback();
11
+ off();
12
+ }
13
+ };
14
+
15
+ if ( document.body.addEventListener ) {
16
+ var set = function () {
17
+ document.body.addEventListener('click', event, true);
18
+ document.body.addEventListener('focus', event, true);
19
+ }
20
+ var off = function () {
21
+ document.body.removeEventListener('click', event, true);
22
+ document.body.removeEventListener('focus', event, true);
23
+ };
24
+
25
+ } else {
26
+ var name = '.evil-outside-' + (new Date()).valueOf();
27
+
28
+ var set = function () {
29
+ evil.body.on('click' + name + ' focus' + name, event);
30
+ }
31
+ var off = function () {
32
+ evil.body.off(name);
33
+ };
34
+ }
35
+
36
+ setTimeout(set, 10);
37
+ return off;
38
+ });
39
+
40
+ })();
@@ -0,0 +1,43 @@
1
+ //= evil-front/core
2
+
3
+ (function() {
4
+ // Call `callback` only after previous callback of `name` queue
5
+ // will be finished. It is useful to animation.
6
+ //
7
+ // b.link.click ->
8
+ // evil.queue 'link', (done) ->
9
+ // $.get $(@).url, (html) ->
10
+ // animation html, ->
11
+ // done()
12
+ evil.queue = function(name, callback) {
13
+ if ( typeof(name) == 'function' ) {
14
+ callback = name;
15
+ name = 'default';
16
+ }
17
+
18
+ if ( typeof(waiters[name]) == 'undefined' ) {
19
+ waiting[name] = false;
20
+ waiters[name] = [];
21
+ }
22
+
23
+ if ( waiting[name] ) {
24
+ waiters[name].push(callback);
25
+ } else {
26
+ call(name, callback);
27
+ }
28
+ };
29
+
30
+ var waiting = { };
31
+ var waiters = { };
32
+
33
+ var call = function(name, callback) {
34
+ waiting[name] = true;
35
+ callback(function () {
36
+ waiting[name] = false;
37
+ var waiter = waiters[name].pop();
38
+ if ( waiter ) {
39
+ call(name, waiter);
40
+ }
41
+ });
42
+ };
43
+ })();
@@ -0,0 +1,46 @@
1
+ //= require evil-front/jquery
2
+
3
+ // Add events to add special class on touch events. It will much faster, than
4
+ // `:hover` selector.
5
+ //
6
+ // By default it add listener to all links and inputs on body.
7
+ // But you can add it to any elements:
8
+ //
9
+ // $('.pseudolink').evil.tappable();
10
+ //
11
+ // Or you can set listeners as “live” delegate:
12
+ //
13
+ // $('.ajax-updated').evil.tappable('.pseudolink');
14
+ //
15
+ // Don’t forget about `no-hover` and `styled-taps` Sass mixins.
16
+ (function () {
17
+ var start = function () {
18
+ this.classList.add('is-tapped');
19
+ };
20
+ var end = function () {
21
+ var link = $(this);
22
+ setTimeout(function () {
23
+ link.removeClass('is-tapped').
24
+ addClass('was-tapped').
25
+ one('mouseenter', function () {
26
+ link.removeClass('was-tapped');
27
+ });
28
+ }, 100);
29
+ };
30
+
31
+ evil.$.extend({
32
+ tappable: function (selector) {
33
+ if ( selector ) {
34
+ this.on('touchstart', selector, start);
35
+ this.on('touchend touchmove', selector, end);
36
+ } else {
37
+ this.on('touchstart', start);
38
+ this.on('touchend touchmove', end);
39
+ }
40
+ }
41
+ });
42
+
43
+ evil.doc.ready(function ($) {
44
+ evil.body.evil.tappable('a, input');
45
+ });
46
+ })();
@@ -0,0 +1,38 @@
1
+ //= require evil-front/core
2
+
3
+ (function() {
4
+ var cache = undefined;
5
+ var inited = false;
6
+
7
+ evil.transform3d = {
8
+
9
+ // Check support for 3D transforms.
10
+ check: function () {
11
+ if ( typeof(cache) != 'undefined' ) {
12
+ return cache;
13
+ }
14
+
15
+ var cache = typeof(evil.body.css('perspective')) != 'undefined';
16
+ var style = document.body;
17
+ if ( cache && typeof(style.webkitPerspective) != 'undefined' ) {
18
+ cache = matchMedia("(transform-3d), (-webkit-transform-3d)");
19
+ cache = cache.matches;
20
+ }
21
+ return cache;
22
+ },
23
+
24
+ // Add `transform3d` or `transform2s` class to body.
25
+ init: function () {
26
+ if ( inited ) {
27
+ return;
28
+ }
29
+ inited = true;
30
+
31
+ evil.doc.ready(function () {
32
+ var type = evil.transform3d.check() ? '3d' : '2d'
33
+ evil.body.addClass('transform-' + type);
34
+ });
35
+ }
36
+ }
37
+
38
+ })();
@@ -0,0 +1,7 @@
1
+ // Load libraries and core files.
2
+
3
+ //= require evil-front/core
4
+ //= require evil-front/after
5
+ //= require evil-front/jquery
6
+
7
+ //= require evil-blocks
@@ -0,0 +1,8 @@
1
+ // Clearfix to set block size from float inners.
2
+ //
3
+ // Based on http://nicolasgallagher.com/micro-clearfix-hack/
4
+ @mixin clearfix
5
+ &:after
6
+ content: ""
7
+ display: table
8
+ clear: both
@@ -0,0 +1,11 @@
1
+ // Shorcut to set black color with alpha in rgba()
2
+ //
3
+ // box-shadow: 0 0 5px black(0.7)
4
+ @function black($opacity)
5
+ @return rgba(0, 0, 0, $opacity)
6
+
7
+ // Shorcut to set white color with alpha in rgba()
8
+ //
9
+ // box-shadow: 0 0 5px white(0.7)
10
+ @function white($opacity)
11
+ @return rgba(255, 255, 255, $opacity)
@@ -0,0 +1,35 @@
1
+ // Variables with easings Bezier curves
2
+ //
3
+ // transition: all 1s $easeInOutBack
4
+
5
+ $easeInSine: cubic-bezier(0.47, 0, 0.745, 0.715)
6
+ $easeOutSine: cubic-bezier(0.39, 0.575, 0.565, 1)
7
+ $easeInOutSine: cubic-bezier(0.445, 0.05, 0.55, 0.95)
8
+
9
+ $easeInQuad: cubic-bezier(0.55, 0.085, 0.68, 0.53)
10
+ $easeOutQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94)
11
+ $easeInOutQuad: cubic-bezier(0.455, 0.03, 0.515, 0.955)
12
+
13
+ $easeInCubic: cubic-bezier(0.55, 0.055, 0.675, 0.19)
14
+ $easeOutCubic: cubic-bezier(0.215, 0.61, 0.355, 1)
15
+ $easeInOutCubic: cubic-bezier(0.645, 0.045, 0.355, 1)
16
+
17
+ $easeInQuart: cubic-bezier(0.895, 0.03, 0.685, 0.22)
18
+ $easeOutQuart: cubic-bezier(0.165, 0.84, 0.44, 1)
19
+ $easeInOutQuart: cubic-bezier(0.77, 0, 0.175, 1)
20
+
21
+ $easeInQuint: cubic-bezier(0.755, 0.05, 0.855, 0.06)
22
+ $easeOutQuint: cubic-bezier(0.23, 1, 0.32, 1)
23
+ $easeInOutQuint: cubic-bezier(0.86, 0, 0.07, 1)
24
+
25
+ $easeInExpo: cubic-bezier(0.95, 0.05, 0.795, 0.035)
26
+ $easeOutExpo: cubic-bezier(0.19, 1, 0.22, 1)
27
+ $easeInOutExpo: cubic-bezier(1, 0, 0, 1)
28
+
29
+ $easeInCirc: cubic-bezier(0.6, 0.04, 0.98, 0.335)
30
+ $easeOutCirc: cubic-bezier(0.075, 0.82, 0.165, 1)
31
+ $easeInOutCirc: cubic-bezier(0.785, 0.135, 0.15, 0.86)
32
+
33
+ $easeInBack: cubic-bezier(0.6, -0.28, 0.735, 0.045)
34
+ $easeOutBack: cubic-bezier(0.175, 0.885, 0.32, 1.275)
35
+ $easeInOutBack: cubic-bezier(0.68, -0.55, 0.265, 1.55)
@@ -0,0 +1,6 @@
1
+ // Mark quotes to move first quote before the text line.
2
+ @mixin flying-quotes
3
+ .space-before-quote
4
+ margin-right: 0.35em
5
+ .quotes
6
+ margin-left: -0.35em
@@ -0,0 +1,9 @@
1
+ // Shortcut to set `height` and `line-height` to vertical text centering.
2
+ // You can also set `$line-diff` to have different `line-height`.
3
+ //
4
+ // .button
5
+ // display: inline-block
6
+ // +height(24px)
7
+ @mixin height($height, $line-diff: 0)
8
+ height: $height
9
+ line-height: $height + $line-diff
@@ -0,0 +1,42 @@
1
+ // Define special class and fonts for Russian currency symbol.
2
+ //
3
+ // You must set you body fonts for `$defaults` argument. Also you can inline
4
+ // in `data:uri` fonts styles, which you will use.
5
+ //
6
+ // +import-ruble("PT Sane, sans-serif", $regular: inline)
7
+ @mixin import-ruble($defaults: sans-serif, $regular: false, $italic: false, $bold: false, $bolditalic: false)
8
+ @font-face
9
+ font-family: 'ALSRubl-Arial'
10
+ @if $regular
11
+ src: inline("evil-front/alsrubl-arial-regular.woff") format("woff")
12
+ @else
13
+ src: font-url("evil-front/alsrubl-arial-regular.woff") format("woff")
14
+
15
+ @font-face
16
+ font-family: 'ALSRubl-Arial'
17
+ font-style: italic
18
+ @if $italic
19
+ src: inline("evil-front/alsrubl-arial-italic.woff") format("woff")
20
+ @else
21
+ src: font-url("evil-front/alsrubl-arial-italic.woff") format("woff")
22
+
23
+ @font-face
24
+ font-family: 'ALSRubl-Arial'
25
+ font-weight: bold
26
+ @if $bold
27
+ src: inline("evil-front/alsrubl-arial-bold.woff") format("woff")
28
+ @else
29
+ src: font-url("evil-front/alsrubl-arial-bold.woff") format("woff")
30
+
31
+ @font-face
32
+ font-family: 'ALSRubl-Arial'
33
+ font-style: italic
34
+ font-weight: bold
35
+ @if $bolditalic
36
+ src: inline("evil-front/alsrubl-arial-bolditalic.woff") format("woff")
37
+ @else
38
+ src: font-url("evil-front/alsrubl-arial-bolditalic.woff") format("woff")
39
+
40
+ .ruble
41
+ font-family: ALSRubl-Arial, unquote($defaults)
42
+ line-height: 1
@@ -0,0 +1,25 @@
1
+ // Shortcuts for CSS Media Queries
2
+
3
+ @mixin max-width($width)
4
+ @media all and (max-width: to-px($width))
5
+ @content
6
+
7
+ @mixin min-width($width)
8
+ @media all and (min-width: to-px($width))
9
+ @content
10
+
11
+ @mixin range-width($min-width, $max-width)
12
+ @media all and (min-width: to-px($min-width)) and (max-width: to-px($max-width))
13
+ @content
14
+
15
+ @mixin max-height($height)
16
+ @media all and (max-height: to-px($height))
17
+ @content
18
+
19
+ @mixin min-height($height)
20
+ @media all and (min-height: to-px($height))
21
+ @content
22
+
23
+ @mixin range-height($min-height, $max-height)
24
+ @media all and (min-height: to-px($min-height)) and (max-height: to-px($max-height))
25
+ @content
@@ -0,0 +1,17 @@
1
+ // Add normal state, to prevent hover on touched elements
2
+ //
3
+ // a
4
+ // display: inline-block
5
+ // +no-hover
6
+ // color: black
7
+ // &:hover
8
+ // color: gray
9
+ // &:active, &.is-tapped
10
+ // background: black
11
+ //
12
+ // To enable `.is-tapped` state, you need to require `evil-front/tappable` JS.
13
+ // Don’t forget to disable transitions in `.is-tapped` and `:active` states by
14
+ // `+styled-taps` mixin.
15
+ @mixin no-hover
16
+ &, &.was-tapped:hover, &.was-tapped:active
17
+ @content
@@ -0,0 +1,9 @@
1
+ // Hide link tap highlight on mobile browsers. Use it only if you define your
2
+ // own pressed styles.
3
+ //
4
+ // .button
5
+ // +no-tap-highlight
6
+ //
7
+ // If you disable all taps highlight, use `styled-taps` mixin.
8
+ @mixin no-tap-highlight
9
+ -webkit-tap-highlight-color: white(0)
@@ -0,0 +1,31 @@
1
+ // Normalize browser default styles and clean some unnecessary styles
2
+ //
3
+ // +evil-reset
4
+
5
+ @mixin evil-reset
6
+ *
7
+ margin: 0
8
+ padding: 0
9
+
10
+ a img
11
+ border: none
12
+
13
+ body
14
+ background: white
15
+ color: black
16
+ line-height: 1.4
17
+
18
+ a, input, textarea, button
19
+ &:focus
20
+ outline: none
21
+ ::-moz-focus-inner
22
+ border: 0
23
+
24
+ h1, h2, h3, h4, h5, h6
25
+ font-weight: normal
26
+
27
+ li
28
+ list-style: none
29
+
30
+ cite
31
+ font-style: normal
@@ -0,0 +1,8 @@
1
+ // Shortcut to set width and height
2
+ //
3
+ // +size(200, 100)
4
+ // +size(32)
5
+ // +size(50%, 10em)
6
+ @mixin size($width, $height: $width)
7
+ width: to-px($width)
8
+ height: to-px($height)