facades 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gitignore +1 -0
  2. data/.rbenv-gemsets +1 -0
  3. data/.rvmrc +1 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +12 -0
  6. data/Guardfile +19 -0
  7. data/README.md +115 -101
  8. data/Rakefile +8 -0
  9. data/app/assets/javascripts/facades/debug/grid.js +0 -0
  10. data/app/helpers/facades_helper.rb +1 -0
  11. data/config.ru +7 -0
  12. data/facades.gemspec +9 -2
  13. data/lib/facades/helpers/layout.rb +36 -73
  14. data/lib/facades/helpers/navigation.rb +182 -110
  15. data/lib/facades/helpers/{elements.rb → notifications.rb} +9 -36
  16. data/lib/facades/helpers.rb +6 -17
  17. data/lib/facades/patterns/tabs.rb +75 -0
  18. data/lib/facades/patterns.rb +7 -0
  19. data/lib/facades/{sass_ext → sass_extensions}/color.rb +5 -13
  20. data/lib/facades/sass_extensions/conversions.rb +27 -0
  21. data/lib/facades/sass_extensions/functions.rb +84 -0
  22. data/lib/facades/sass_extensions/icons.rb +66 -0
  23. data/lib/facades/sass_extensions.rb +21 -0
  24. data/lib/facades/support/compass/project/MIT-LICENSE.txt +20 -0
  25. data/lib/facades/support/compass/project/humans.txt +8 -0
  26. data/lib/facades/support/compass/project/index.html +45 -0
  27. data/lib/facades/support/compass/project/manifest.rb +18 -0
  28. data/lib/facades/support/compass/project/robots.txt +4 -0
  29. data/lib/facades/support/compass.rb +9 -0
  30. data/lib/facades/support/rails.rb +12 -15
  31. data/lib/facades/support/simple_form.rb +32 -0
  32. data/lib/facades/version.rb +1 -1
  33. data/lib/facades.rb +21 -44
  34. data/spec/internal/app/helpers/application_helper.rb +3 -0
  35. data/spec/internal/app/views/navigation/_multi_list.html.erb +11 -0
  36. data/spec/internal/app/views/navigation/_multi_option_list.html.erb +14 -0
  37. data/spec/internal/app/views/navigation/_single_list.html.erb +9 -0
  38. data/spec/internal/config/database.yml +3 -0
  39. data/spec/internal/config/routes.rb +3 -0
  40. data/spec/internal/db/schema.rb +3 -0
  41. data/spec/internal/log/.gitignore +1 -0
  42. data/spec/internal/public/favicon.ico +0 -0
  43. data/spec/spec_helper.rb +16 -6
  44. data/spec/unit/helpers/layout_spec.rb +4 -0
  45. data/spec/unit/helpers/navigation_spec.rb +384 -0
  46. data/spec/unit/helpers/notifications_spec.rb +4 -0
  47. data/spec/unit/patterns/tabs_spec.rb +58 -0
  48. data/src/icons/facades.yml +105 -0
  49. data/src/icons/font-awesome.yml +210 -0
  50. data/src/scss/facades/_buttons.scss +10 -0
  51. data/src/scss/facades/_config.scss +99 -0
  52. data/src/scss/facades/_debug.scss +8 -0
  53. data/src/scss/facades/_forms.scss +228 -0
  54. data/src/scss/facades/_global.scss +104 -0
  55. data/src/scss/facades/_icons.scss +61 -0
  56. data/src/scss/facades/_mixins.scss +115 -0
  57. data/src/scss/facades/_mobile.scss +3 -0
  58. data/src/scss/facades/_setup.scss +191 -0
  59. data/src/scss/facades/_typography.scss +220 -0
  60. data/src/scss/facades/buttons/_glossy.scss +29 -0
  61. data/src/scss/facades/buttons/_gradient.scss +36 -0
  62. data/src/scss/facades/buttons/_shared.scss +33 -0
  63. data/src/scss/facades/buttons/_simple.scss +28 -0
  64. data/src/scss/facades/icons/_classes.scss +37 -0
  65. data/src/scss/facades/icons/_legacy.scss +27 -0
  66. data/src/scss/facades/layout/_lists.scss +43 -0
  67. data/src/scss/facades/mixins/_gradients.scss +30 -0
  68. data/src/scss/facades/mixins/_rhythm.scss +37 -0
  69. data/src/scss/facades/mobile/_buttons.scss +97 -0
  70. data/src/scss/facades/mobile/_config.scss +30 -0
  71. data/src/scss/facades/mobile/_global.scss +81 -0
  72. data/src/scss/facades/mobile/_mixins.scss +49 -0
  73. data/src/scss/facades/mobile/_setup.scss +50 -0
  74. data/src/scss/facades/mobile/patterns/_navbar.scss +21 -0
  75. data/src/scss/facades/mobile/patterns/_panel.scss +37 -0
  76. data/src/scss/facades/mobile/patterns/_stage.scss +20 -0
  77. data/src/scss/facades/mobile/patterns/_toolbar.scss +25 -0
  78. data/src/scss/facades/mobile/themes/_apple.scss +17 -0
  79. data/src/scss/facades/patterns/_labels.scss +50 -0
  80. data/src/scss/facades/patterns/_navbar.scss +4 -0
  81. data/src/scss/facades/patterns/_notifications.scss +82 -0
  82. data/src/scss/facades/patterns/_pagination.scss +4 -0
  83. data/src/scss/facades/patterns/_pills.scss +50 -0
  84. data/src/scss/facades/patterns/_tabs.scss +83 -0
  85. data/src/scss/facades/patterns/_twipsy.scss +84 -0
  86. data/src/scss/facades/typography/_tables.scss +95 -0
  87. metadata +201 -58
  88. data/app/views/facades/_pagination.html.erb +0 -20
  89. data/lib/facades/builders/form/base.rb +0 -212
  90. data/lib/facades/builders/form/elements.rb +0 -112
  91. data/lib/facades/builders/form/helper.rb +0 -29
  92. data/lib/facades/builders/form.rb +0 -22
  93. data/lib/facades/builders/sprite.rb +0 -50
  94. data/lib/facades/builders/table.rb +0 -76
  95. data/lib/facades/debug/html.rb +0 -6
  96. data/lib/facades/helpers/builders.rb +0 -24
  97. data/lib/facades/helpers/mobile.rb +0 -57
  98. data/lib/facades/helpers/pagination.rb +0 -83
  99. data/lib/facades/helpers/utility.rb +0 -31
  100. data/lib/facades/sass_ext/form_elements.rb +0 -52
  101. data/lib/facades/sass_ext/funcs.rb +0 -33
  102. data/lib/facades/sass_ext.rb +0 -14
  103. data/lib/facades/stylesheets/facades/_common.scss +0 -7
  104. data/lib/facades/stylesheets/facades/_css3.scss +0 -93
  105. data/lib/facades/stylesheets/facades/_layout.scss +0 -5
  106. data/lib/facades/stylesheets/facades/_normalize.scss +0 -5
  107. data/lib/facades/stylesheets/facades/_setup.scss +0 -104
  108. data/lib/facades/stylesheets/facades/_typography.scss +0 -2
  109. data/lib/facades/stylesheets/facades/_ui.scss +0 -3
  110. data/lib/facades/stylesheets/facades/_utilities.scss +0 -32
  111. data/lib/facades/stylesheets/facades/layout/_dropdown-list.scss +0 -7
  112. data/lib/facades/stylesheets/facades/layout/_forms.scss +0 -53
  113. data/lib/facades/stylesheets/facades/layout/_grid.scss +0 -49
  114. data/lib/facades/stylesheets/facades/layout/_responsive_grid.scss +0 -164
  115. data/lib/facades/stylesheets/facades/setup/_forms.scss +0 -284
  116. data/lib/facades/stylesheets/facades/setup/_ie.scss +0 -12
  117. data/lib/facades/stylesheets/facades/setup/_reset.scss +0 -255
  118. data/lib/facades/stylesheets/facades/typography/_baseline.scss +0 -91
  119. data/lib/facades/stylesheets/facades/typography/_lists.scss +0 -34
  120. data/lib/facades/stylesheets/facades/typography/_shadow.scss +0 -8
  121. data/lib/facades/stylesheets/facades/ui/_buttons.scss +0 -34
  122. data/lib/facades/stylesheets/facades/ui/_flash-messages.scss +0 -29
  123. data/lib/facades/stylesheets/facades/ui/_tabbed.scss +0 -5
  124. data/lib/facades/stylesheets/facades/ui/_tool-tip.scss +0 -44
  125. data/lib/facades/stylesheets/facades/utilities/_clearfix.scss +0 -20
  126. data/lib/facades/stylesheets/facades/utilities/_color.scss +0 -7
  127. data/lib/facades/stylesheets/facades/utilities/_cursors.scss +0 -4
  128. data/lib/facades/support/serve.rb +0 -17
  129. data/lib/facades/support/tipsy.rb +0 -17
  130. data/spec/facades/helpers/elements_spec.rb +0 -86
  131. data/spec/facades/helpers/layout_helpers_spec.rb +0 -5
  132. data/spec/facades/helpers/navigation_spec.rb +0 -107
@@ -1,29 +0,0 @@
1
- module Facades::Builders
2
- module FormHelper
3
- ##
4
- #
5
- # Cusomizes the default form_for helper to add additional functionality
6
- # All params are the same as Rails' form_for
7
- #
8
- # @param [Mixed] record_name_or_array
9
- # @param [Array] args
10
- # @param [Block] &block
11
- #
12
- def form_for(record_name_or_array, *args, &proc)
13
-
14
- raise ArgumentError, "Missing block" unless block_given?
15
-
16
- options = args.extract_options!
17
- options.reverse_merge!(:builder => Facades::Builders::Form)
18
- options[:html] ||= {}
19
- options[:html].merge!('data-js-validatable' => true) if options.delete(:validate)
20
-
21
- default_proc = ::ActionView::Base.field_error_proc
22
- ::ActionView::Base.field_error_proc = lambda{ |html_tag, instance_tag| html_tag }
23
- super(record_name_or_array, *(args << options), &proc)
24
- ensure
25
- ::ActionView::Base.field_error_proc = default_proc
26
- end
27
-
28
- end
29
- end
@@ -1,22 +0,0 @@
1
- require 'facades/builders/form/base'
2
- require 'facades/builders/form/elements'
3
- require 'facades/builders/form/helper'
4
-
5
- module Facades
6
- module Builders
7
- class Form < ActionView::Helpers::FormBuilder #:nodoc:
8
- include Facades::Builders::FormBuilder::Base
9
- include Facades::Builders::FormBuilder::Elements
10
-
11
- def with_custom_error_proc(&block)
12
- default_proc = ::ActionView::Base.field_error_proc
13
- ::ActionView::Base.field_error_proc = lambda{ |html_tag, instance_tag| html_tag }
14
- yield
15
- ensure
16
- ::ActionView::Base.field_error_proc = default_proc
17
- end
18
-
19
- ActionView::Base.send(:include, Facades::Builders::FormHelper)
20
- end
21
- end
22
- end
@@ -1,50 +0,0 @@
1
- require 'tilt'
2
-
3
- module Facades
4
- module Builders
5
- class Sprite < Tilt::Template
6
-
7
- def prepare
8
- end
9
-
10
- def evaluate(scope, locals, &block)
11
- sprites = sprite_context(scope)
12
- sprites.instance_eval data
13
- sprites = sprites.send(:fetch!).uniq
14
- File.open(sprites.first).read
15
- end
16
-
17
- def locate_sprite_folder(scope)
18
- paths, name = scope.environment.paths, File.basename(scope.logical_path)
19
- paths.detect{ |p| File.directory?(File.join(p, name)) }
20
- end
21
-
22
- def sprite_context(scope)
23
- cxt = SpriteContext.new
24
- cxt.root = locate_sprite_folder(scope)
25
- cxt.base_path = File.basename(scope.logical_path)
26
- cxt
27
- end
28
-
29
- class SpriteContext
30
- attr_accessor :base_path, :sprite_images, :root
31
- def images(*args)
32
- @sprite_images = args
33
- end
34
- private
35
- def fetch!
36
- @sprite_images ||= Dir.glob(File.join(root, base_path, '*.png'))
37
- end
38
- end
39
-
40
- end
41
-
42
- end
43
- end
44
-
45
- begin
46
- require 'sprockets'
47
- Sprockets::Engines
48
- Sprockets.register_engine '.sprite', Facades::Builders::Sprite
49
- rescue LoadError
50
- end
@@ -1,76 +0,0 @@
1
- module Facades
2
- module Builders
3
- class TableBuilder
4
- attr_reader :template, :options, :resources, :buffer
5
-
6
- def initialize(resources, tpl, options)
7
- @buffer = ""
8
- @template, @options, @resources = tpl, options, resources
9
- end
10
-
11
- delegate :content_tag, :to => :template
12
-
13
- ##
14
- # Get a list of all headings for the table
15
- # Use the resource class's table_headings method first, options hash next
16
- #
17
- def headings
18
- return resource_class.table_attributes if resource_class.respond_to?(:table_attributes)
19
- [options[:headings]].flatten.compact
20
- end
21
-
22
- ##
23
- # The class for this resource
24
- def resource_class
25
- resources.first.class
26
- end
27
-
28
- ##
29
- # Renders the table content immediately using the provided options
30
- def inline!
31
- [head, body].map(&:to_s).join("\n")
32
- end
33
-
34
- def head
35
- return content_tag(:thead, render_heading) unless block_given?
36
- content_tag(:thead) do
37
- yield self
38
- end
39
- end
40
-
41
- def body
42
- return content_tag(:tbody, render_body) unless block_given?
43
- content_tag(:tbody) do
44
- yield self
45
- end
46
- end
47
-
48
- private
49
-
50
- # Render an entire body inline
51
- def render_body
52
- rows = []
53
- resources.each_with_index do |res, index|
54
- attrs = { :class => (ind.even? ? 'even' : 'odd') }
55
- buff = content_tag(:tr, attrs) do
56
- headings.collect do |hd|
57
- content_tag(:td, res.send(:"#{hd}"))
58
- end.to_s.join("\n")
59
- end
60
- rows << buff
61
- end
62
- rows.map(&:to_s).join("\n")
63
- end
64
-
65
- # Render entire body inline
66
- def render_heading
67
- buffer << template.content_tag(:thead) do
68
- headings.collect do |hd|
69
- content_tag(:th, hd)
70
- end.to_s.join("\n")
71
- end
72
- end
73
-
74
- end
75
- end
76
- end
@@ -1,6 +0,0 @@
1
- module Facades
2
- module Debug
3
- module Html
4
- end
5
- end
6
- end
@@ -1,24 +0,0 @@
1
- require 'facades/builders/table'
2
-
3
- module Facades
4
- module Helpers
5
- module Builders
6
-
7
- def table_for(resource_or_class, *args, &block)
8
- options = args.extract_options!
9
- html_attrs = options.delete(:html)
10
- builder = options.delete(:builder) || TableBuilder
11
- builder = builder.new(resource_or_class, self, options)
12
-
13
- unless block_given?
14
- content_tag(:table, builder.inline!, html_attrs)
15
- else
16
- content_tag(:table, html_attrs) do
17
- yield builder
18
- end
19
- end
20
- end
21
-
22
- end
23
- end
24
- end
@@ -1,57 +0,0 @@
1
- module Facades
2
- module Helpers
3
- ##
4
- # Helper methods for mobile tags and attributes
5
- module Mobile
6
-
7
- def mobile_meta_tags
8
- tags = [ tag(:meta, {"http-equiv" => 'cleartype', 'content' => 'on' }), # IE Cleartype
9
- meta_tag('HandheldFriendly', 'True'),
10
- meta_tag('viewport', "width=device-width, minimum-scale=1.0, initial-scale=1.0")
11
- ].join("\n")
12
- tags = tags.html_safe if tags.respond_to?(:html_safe)
13
- end
14
-
15
- def mobile_only(&block)
16
- return "" unless mobile_device?
17
- capture(&block)
18
- end
19
-
20
- def unless_mobile_device(&block)
21
- return "" if mobile_device?
22
- capture(&block)
23
- end
24
-
25
- end
26
-
27
- module MobileController
28
- extend ActiveSupport::Concern
29
-
30
- included do
31
- helper_method :mobile_device?, :iphone?, :android?
32
- end
33
-
34
- def mobile_device_user_agent_regexp
35
- Regexp.new(['palm','blackberry','nokia','phone','midp','mobi','symbian','chtml','ericsson','minimo',
36
- 'audiovox','motorola','samsung','telit','upg1','windows ce','ucweb','astel','plucker',
37
- 'x320','x240','j2me','sgh','portable','sprint','docomo','kddi','softbank','android','mmp',
38
- 'pdxgw','netfront','xiino','vodafone','portalmmm','sagem','mot-','sie-','ipod','up\\.b',
39
- 'webos','amoi','novarra','cdm','alcatel','pocket','ipad','iphone','mobileexplorer','mobile'].join('|'))
40
- end
41
-
42
- def iphone?
43
- request.user_agent.to_s.downcase.include?("iphone")
44
- end
45
-
46
- def android?
47
- request.user_agent.to_s.downcase.include?("android")
48
- end
49
-
50
- def mobile_device?
51
- request.user_agent.to_s.downcase =~ mobile_device_user_agent_regexp
52
- end
53
-
54
- end
55
-
56
- end
57
- end
@@ -1,83 +0,0 @@
1
- module Facades
2
- module Helpers
3
-
4
- module Pagination
5
-
6
- class PageLink
7
- attr_reader :number
8
- attr_reader :current
9
-
10
- def initialize(num, curr)
11
- @number = num
12
- @current = curr
13
- end
14
-
15
- def current?
16
- current === true
17
- end
18
-
19
- end
20
-
21
- class Paginator
22
-
23
- attr_reader :current_page
24
- attr_reader :total_pages
25
- attr_reader :attributes
26
- attr_reader :links
27
-
28
- def initialize(collection, view, request)
29
- @total_pages = collection.total_pages
30
- @current_page = collection.current_page
31
- @links = []
32
- @template = view
33
- @request = request
34
- end
35
-
36
- def paginate!(window)
37
- window.each do |page|
38
- @links << PageLink.new(page, (page == current_page))
39
- end
40
- end
41
-
42
- def first?
43
- current_page == 1
44
- end
45
-
46
- def last?
47
- (current_page == total_pages)
48
- end
49
-
50
- def next
51
- links.detect{ |l| l.number == current_page + 1 }
52
- end
53
-
54
- def previous
55
- links.detect{ |l| l.number == current_page - 1 }
56
- end
57
-
58
- def link(page_number, attrs = {}, text = nil)
59
- text ||= page_number
60
- options = CGI.parse(@request.query_string).merge('page' => page_number)
61
- @template.link_to(text.to_s.html_safe, "?#{options.to_query}", attrs)
62
- end
63
-
64
- end
65
-
66
- def paginate(collection, html_attrs = {}, file = "facades/pagination")
67
-
68
- return "" if collection.total_count <= 0
69
- paginator = Paginator.new(collection, self, request)
70
- window_min = [(paginator.current_page - 5), 1].max
71
- window_max = [(paginator.current_page + 5), paginator.total_pages].min
72
- wrapper = Facades.enable_html5 ? :nav : :div
73
-
74
- paginator.paginate!((window_min..window_max).to_a)
75
- contents = render(partial: file, locals: { paginator: paginator })
76
-
77
- content_tag(wrapper, contents.html_safe, class: 'pagination')
78
- end
79
-
80
- end
81
-
82
- end
83
- end
@@ -1,31 +0,0 @@
1
- module Facades
2
- module Helpers
3
- module Utility
4
-
5
- def facade_assets
6
- content = if_ie(8) do
7
- javascript_include_tag("https://html5shim.googlecode.com/svn/trunk/html5.js")
8
- end
9
- content.to_s.html_safe
10
- end
11
-
12
- ##
13
- # Render an IE conditional statement. By default conditionals use a less-than-or-equal-to format. Use the `specific`
14
- # param to force only that version.
15
- #
16
- # @param version [Integer] The IE version to target
17
- # @param specific [Boolean] optional Target the IE version specificially.
18
- #
19
- #
20
- def if_ie(version, specific = false, &block)
21
- content = capture(&block)
22
- condition = specific ? "IE #{version}" : "lte IE #{version}"
23
- str = "<!--[if #{condition}]>"
24
- str << content.html_safe.lstrip
25
- str << "<![endif]-->"
26
- str.html_safe
27
- end
28
-
29
- end
30
- end
31
- end
@@ -1,52 +0,0 @@
1
- module Facades
2
- module SassExt
3
- module FormElements
4
-
5
- def fields_of_type(*args)
6
- types = args.collect do |type|
7
- send(:"#{type}_input_types")
8
- end
9
- Sass::Script::String.new(types.join(", "))
10
- end
11
-
12
- private
13
-
14
- def all_input_types
15
- [:checkbox, :password, :radio, :select, :string, :textarea].collect{ |t| send(:"#{t}_input_types") }.flatten.compact
16
- end
17
-
18
- def button_input_types
19
- "input[type=submit], input[type=reset], button[type=submit]"
20
- end
21
-
22
- def checkbox_input_types
23
- "input[type=checkbox]"
24
- end
25
- alias :check_input_types :checkbox_input_types
26
-
27
- def password_input_types
28
- "input[type=password]"
29
- end
30
-
31
- def radio_input_types
32
- "input[type=radio]"
33
- end
34
-
35
- def select_input_types
36
- "select"
37
- end
38
-
39
- def string_input_types
40
- %w{email password text number search tel time url datetime date datetime-local week month}.collect do |type|
41
- "input[type=#{type}]"
42
- end
43
- end
44
-
45
- def textarea_input_types
46
- "textarea"
47
- end
48
-
49
- end
50
-
51
- end
52
- end
@@ -1,33 +0,0 @@
1
- module Facades
2
- module SassExt
3
- module Funcs
4
-
5
- ##
6
- # Compact via compass
7
- #
8
- def compact(*args)
9
- sep = :comma
10
- if args.size == 1 && args.first.is_a?(Sass::Script::List)
11
- list = args.first
12
- args = list.value
13
- sep = list.separator
14
- end
15
- Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
16
- end
17
-
18
- ##
19
- # Joins a list with spaces or returns a single element if the
20
- # list only contains one item
21
- #
22
- def spacify(list)
23
- if list.is_a?(Sass::Script::List)
24
- Sass::Script::List.new(list.value.dup, :space)
25
- else
26
- Sass::Script::List.new([list], :space)
27
- end
28
- end
29
-
30
-
31
- end # Funcs
32
- end # SassExt
33
- end # Facades
@@ -1,14 +0,0 @@
1
- require 'sass'
2
- module Facades
3
- module SassExt
4
- end
5
- end
6
-
7
- ['form_elements', 'color', 'funcs'].each do |req|
8
- require "facades/sass_ext/#{req}"
9
- Sass::Script::Functions.send(:include, Facades::SassExt.const_get(req.camelize))
10
- end
11
-
12
- class Sass::Script::Functions::EvaluationContext
13
- include Sass::Script::Functions
14
- end
@@ -1,7 +0,0 @@
1
- // Includes modules generally used in most applications.
2
-
3
- @import 'facades/utilities';
4
- @import 'facades/ui';
5
- @import 'facades/layout';
6
- @import 'facades/typography/lists';
7
- @import 'facades/typography/shadow';
@@ -1,93 +0,0 @@
1
- $_vendor-prefixes: compact(-moz -webkit -o -ms);
2
- $_common-prefixes: compact(-moz -webkit -o);
3
-
4
- // Outputs vendor prefixed property names
5
- @mixin with-vendor-prefix($property, $values, $type: default){
6
- $prefixes:if($type == default, $_vendor-prefixes, $_common-prefixes);
7
- @each $prefix in $prefixes{
8
- #{join(compact($prefix), compact($property), ",")}:$values;
9
- }
10
- }
11
-
12
- @mixin background-size($size1: 100% auto, $size2: false, $size3: false, $size4: false, $size5: false){
13
- $sizes: compact($size1, $size2, $size3, $size4, $size5);
14
- @include with-vendor-prefix(background-size, $sizes, common);
15
- background-size:$sizes;
16
- }
17
-
18
- @mixin border-radius($radius){
19
- @include with-vendor-prefix(border-radius, $radius);
20
- border-radius:$radius;
21
- }
22
-
23
- @mixin box-shadow($color, $horiz, $vert, $blur, $spread, $inner){
24
- $props: compact();
25
- @if( $inset == true or $inset == inset ){
26
- $props: join($props, inset);
27
- }
28
-
29
- $props: join($props, compact($color $horiz $vert $blur $spread));
30
- @include with-vendor-prefix(box-shadow, spacify($props));
31
- box-shadow: spacify($props);
32
- }
33
-
34
-
35
- @mixin linear-gradient($pos, $g1, $g2:false, $g3:false, $g4:false, $g5:false, $g6:false, $g7:false, $g8:false, $g9:false, $g10:false){
36
-
37
- $pos-type: type-of(nth($pos, 1));
38
- @if ($pos-type == color) or (nth($pos, 1) == "transparent"){
39
- $g10: $g9; $g9: $g8; $g8: $g7; $g7: $g6; $g6: $g5; $g5: $g4; $g4: $g3; $g3: $g2; $g2: $g1; $g1: $pos;
40
- $pos: top; // Default position
41
- }
42
-
43
- $basic: ($g1);
44
- $webkit: color-stop($g1);
45
-
46
- @each $grad in $g2 $g3 $g4 $g5 $g6 $g7 $g8 $g9 $g10{
47
- @if $grad != false{
48
- $basic: $basic + ',' + $grad;
49
- $webkit: $webkit + ',' + color-stop($grad);
50
- }
51
- }
52
-
53
- $basic: unquote($basic);
54
- $webkit: unquote($webkit);
55
-
56
- background-color: nth($g1, 1);
57
- background: deprecated-webkit-gradient(linear, $basic) no-repeat;
58
- background: -webkit-gradient(linear, $pos, $webkit) no-repeat;
59
- background: -webkit-linear-gradient($pos, $basic) no-repeat;
60
- background: -moz-linear-gradient($pos, $basic) no-repeat;
61
- background: -ms-linear-gradient($pos, $basic) no-repeat;
62
- background: -o-linear-gradient($pos, $basic) no-repeat;
63
- background: linear-gradient($pos, $basic) no-repeat;
64
- }
65
-
66
- @mixin transition($properties:all, $duration: 1s, $delay:false, $function: false){
67
- @include transition-property($properties);
68
- @include transition-duration($duration);
69
- @include transition-timing-function($function);
70
- @include transition-delay($delay);
71
- }
72
-
73
- @mixin transition-property($properties: all) {
74
- @include with-vendor-prefix(transition-duration, unquote($properties));
75
- transition-property:spacify($properties);
76
- }
77
-
78
-
79
- @mixin transition-duration($duration: 1s) {
80
- @include with-vendor-prefix(transition-duration, if(type-of($duration) == string, unquote($duration), $duration));
81
- transition-duration:$duration;
82
- }
83
-
84
- @mixin transition-timing-function($function: false) {
85
- @include with-vendor-prefix(transition-timing-function, unquote($function));
86
- transition-timing-function:$function;
87
- }
88
-
89
-
90
- @mixin transition-delay($delay: false) {
91
- @include with-vendor-prefix(transition-delay, if(type-of($delay) == string, unquote($delay), $delay));
92
- transition-delay:$delay;
93
- }
@@ -1,5 +0,0 @@
1
- // All layout mixins
2
-
3
- @import 'facades/layout/grid';
4
- @import 'facades/layout/forms';
5
- @import 'facades/layout/dropdown-list';
@@ -1,5 +0,0 @@
1
- // Normalize
2
- // ----------------------------------------------------------
3
-
4
- @import 'facades/setup/reset';
5
- @import 'facades/setup/forms';