zurb-foundation 3.2.5 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -2
- data/CHANGELOG.md +1 -26
- data/CONTRIBUTING.md +18 -0
- data/Gemfile.lock +19 -0
- data/Gruntfile.js +27 -0
- data/README.md +5 -6
- data/{Capfile → docs/Capfile} +0 -1
- data/docs/Gemfile +8 -0
- data/docs/Gemfile.lock +43 -0
- data/docs/Procfile +2 -0
- data/docs/README.md +1 -0
- data/docs/_sidebar-components.html.erb +109 -0
- data/docs/_sidebar.html.erb +109 -0
- data/docs/_zurb-jobs.html.erb +5 -0
- data/docs/changelog.html.erb +185 -0
- data/docs/compile.rb +43 -0
- data/docs/components/alert-boxes.html.erb +202 -0
- data/docs/components/block-grid.html.erb +118 -0
- data/docs/components/breadcrumbs.html.erb +146 -0
- data/docs/components/button-groups.html.erb +174 -0
- data/docs/components/buttons.html.erb +220 -0
- data/docs/components/clearing.html.erb +152 -0
- data/docs/components/custom-forms.html.erb +306 -0
- data/docs/components/dropdown-buttons.html.erb +233 -0
- data/docs/components/dropdown.html.erb +186 -0
- data/docs/components/flex-video.html.erb +93 -0
- data/docs/components/forms.html.erb +468 -0
- data/docs/components/grid.html.erb +355 -0
- data/docs/components/inline-lists.html.erb +89 -0
- data/docs/components/joyride.html.erb +178 -0
- data/docs/components/keystrokes.html.erb +74 -0
- data/docs/components/labels.html.erb +98 -0
- data/docs/components/magellan.html.erb +84 -0
- data/docs/components/orbit.html.erb +262 -0
- data/docs/components/pagination.html.erb +181 -0
- data/docs/components/panels.html.erb +121 -0
- data/docs/components/pricing-tables.html.erb +154 -0
- data/docs/components/progress-bars.html.erb +120 -0
- data/docs/components/reveal.html.erb +147 -0
- data/docs/components/section.html.erb +156 -0
- data/docs/components/side-nav.html.erb +122 -0
- data/docs/components/split-buttons.html.erb +218 -0
- data/docs/components/sub-nav.html.erb +120 -0
- data/docs/components/switch.html.erb +288 -0
- data/docs/components/tables.html.erb +123 -0
- data/docs/components/thumbnails.html.erb +87 -0
- data/docs/components/tooltips.html.erb +73 -0
- data/docs/components/top-bar.html.erb +219 -0
- data/docs/components/type.html.erb +359 -0
- data/docs/components/visibility.html.erb +102 -0
- data/docs/config.ru +12 -0
- data/docs/config/deploy.rb +33 -0
- data/docs/controller.rb +43 -0
- data/docs/css/_coderay.scss +116 -0
- data/docs/css/_settings.scss +1 -0
- data/docs/css/docs.scss +174 -0
- data/docs/css/normalize.scss +396 -0
- data/docs/css/qunit-composite.css +13 -0
- data/docs/css/qunit.css +235 -0
- data/docs/faq.html.erb +61 -0
- data/docs/img/demos/demo1-th.png +0 -0
- data/docs/img/demos/demo1.png +0 -0
- data/docs/img/demos/demo2-th.png +0 -0
- data/docs/img/demos/demo2.png +0 -0
- data/docs/img/demos/demo3-th.png +0 -0
- data/docs/img/demos/demo3.png +0 -0
- data/docs/img/demos/demo4-th.png +0 -0
- data/docs/img/demos/demo4.png +0 -0
- data/docs/img/demos/demo5-th.png +0 -0
- data/docs/img/demos/demo5.png +0 -0
- data/docs/index.html.erb +299 -0
- data/docs/javascript.html.erb +133 -0
- data/docs/js/docs.js +3 -0
- data/docs/js/qunit-composite.js +105 -0
- data/docs/js/qunit.js +1977 -0
- data/docs/js/tests/tabs/simple_tabs.html +57 -0
- data/docs/js/tests/tabs/simple_tabs.js +54 -0
- data/docs/js/tests/tooltips/tooltips.html +39 -0
- data/docs/js/tests/tooltips/tooltips.js +11 -0
- data/docs/layout.html.erb +99 -0
- data/docs/rails.html.erb +66 -0
- data/docs/sass.html.erb +299 -0
- data/docs/support.html.erb +134 -0
- data/foundation.gemspec +2 -4
- data/index.html +3 -23
- data/js/foundation/foundation.alerts.js +50 -0
- data/js/foundation/foundation.clearing.js +478 -0
- data/{vendor/assets/javascripts/foundation/jquery.cookie.js → js/foundation/foundation.cookie.js} +3 -1
- data/js/foundation/foundation.dropdown.js +122 -0
- data/js/foundation/foundation.forms.js +403 -0
- data/js/foundation/foundation.joyride.js +613 -0
- data/js/foundation/foundation.js +331 -0
- data/js/foundation/foundation.magellan.js +130 -0
- data/js/foundation/foundation.orbit.js +355 -0
- data/{vendor/assets/javascripts/foundation/jquery.placeholder.js → js/foundation/foundation.placeholder.js} +4 -2
- data/js/foundation/foundation.reveal.js +264 -0
- data/js/foundation/foundation.section.js +180 -0
- data/js/foundation/foundation.tooltips.js +195 -0
- data/js/foundation/foundation.topbar.js +187 -0
- data/js/foundation/index.js +16 -0
- data/{vendor/assets/javascripts/foundation/modernizr.foundation.js → js/vendor/custom.modernizr.js} +0 -0
- data/js/vendor/jquery.js +9597 -0
- data/js/vendor/zepto.js +1782 -0
- data/lib/foundation/engine.rb +8 -1
- data/lib/foundation/generators/install_generator.rb +24 -1
- data/lib/foundation/generators/templates/application.html.erb +20 -6
- data/lib/foundation/generators/templates/application.html.haml +2 -6
- data/lib/foundation/generators/templates/application.html.slim +2 -5
- data/lib/foundation/version.rb +1 -1
- data/lib/zurb-foundation.rb +7 -9
- data/package.json +9 -0
- data/scss/foundation.scss +42 -15
- data/scss/foundation/_foundation-global.scss +226 -0
- data/scss/foundation/components/_alert-boxes.scss +106 -0
- data/scss/foundation/components/_block-grid.scss +63 -0
- data/scss/foundation/components/_breadcrumbs.scss +117 -0
- data/scss/foundation/components/_button-groups.scss +59 -0
- data/scss/foundation/components/_buttons.scss +217 -0
- data/scss/foundation/components/_clearing.scss +209 -0
- data/scss/foundation/components/_custom-forms.scss +232 -0
- data/scss/foundation/components/_dropdown-buttons.scss +114 -0
- data/scss/foundation/components/_dropdown.scss +137 -0
- data/scss/foundation/components/_flex-video.scss +45 -0
- data/scss/foundation/components/_forms.scss +309 -0
- data/scss/foundation/components/_grid.scss +149 -71
- data/scss/foundation/components/_inline-lists.scss +47 -0
- data/scss/foundation/components/_joyride.scss +193 -0
- data/scss/foundation/components/_keystrokes.scss +56 -0
- data/scss/foundation/components/_labels.scss +81 -0
- data/scss/foundation/components/_magellan.scss +15 -0
- data/scss/foundation/components/_orbit.scss +193 -0
- data/scss/foundation/components/_pagination.scss +99 -0
- data/scss/foundation/components/_panels.scss +76 -0
- data/scss/foundation/components/_pricing-tables.scss +130 -0
- data/scss/foundation/components/_progress-bars.scss +68 -0
- data/scss/foundation/components/_reveal.scss +131 -0
- data/scss/foundation/components/_section.scss +194 -0
- data/scss/foundation/components/_side-nav.scss +68 -0
- data/scss/foundation/components/_split-buttons.scss +159 -0
- data/scss/foundation/components/_sub-nav.scss +67 -0
- data/scss/foundation/components/_switch.scss +242 -0
- data/scss/foundation/components/_tables.scss +80 -0
- data/scss/foundation/components/_thumbs.scss +45 -0
- data/scss/foundation/components/_tooltips.scss +113 -0
- data/scss/foundation/components/_top-bar.scss +443 -0
- data/scss/foundation/components/_type.scss +411 -0
- data/scss/foundation/components/_visibility.scss +117 -0
- data/scss/normalize.scss +396 -0
- data/templates/project/config.rb +26 -0
- data/templates/project/index.html +28 -43
- data/templates/project/manifest.rb +21 -28
- data/templates/project/scss/_settings.scss +4 -243
- data/templates/project/scss/app.scss +37 -44
- data/templates/project/scss/normalize.scss +396 -0
- data/test/stylesheets/styles.css +955 -0
- metadata +144 -153
- data/config/deploy.rb +0 -42
- data/lib/foundation/generators/layout_generator.rb +0 -28
- data/scss/foundation/_settings.scss +0 -281
- data/scss/foundation/common/_base.scss +0 -4
- data/scss/foundation/common/_forms.scss +0 -117
- data/scss/foundation/common/_globals.scss +0 -35
- data/scss/foundation/common/_ratios.scss +0 -19
- data/scss/foundation/common/_typography.scss +0 -104
- data/scss/foundation/components/modules/_all.scss +0 -10
- data/scss/foundation/components/modules/_buttons.scss +0 -178
- data/scss/foundation/components/modules/_clearing.scss +0 -61
- data/scss/foundation/components/modules/_joyride.scss +0 -33
- data/scss/foundation/components/modules/_mqueries.scss +0 -458
- data/scss/foundation/components/modules/_navbar.scss +0 -74
- data/scss/foundation/components/modules/_offcanvas.scss +0 -55
- data/scss/foundation/components/modules/_orbit.scss +0 -90
- data/scss/foundation/components/modules/_reveal.scss +0 -34
- data/scss/foundation/components/modules/_tabs.scss +0 -67
- data/scss/foundation/components/modules/_topbar.scss +0 -167
- data/scss/foundation/components/modules/_ui.scss +0 -292
- data/scss/foundation/functions/_all.scss +0 -2
- data/scss/foundation/functions/_convert-number-to-word.scss +0 -10
- data/scss/foundation/functions/_grid-calc.scss +0 -5
- data/scss/foundation/functions/modular-scale.scss +0 -3
- data/scss/foundation/mixins/_all.scss +0 -5
- data/scss/foundation/mixins/_clearfix.scss +0 -13
- data/scss/foundation/mixins/_css-triangle.scss +0 -22
- data/scss/foundation/mixins/_font-size.scss +0 -13
- data/scss/foundation/mixins/_respond-to.scss +0 -11
- data/scss/foundation/mixins/_semantic-grid.scss +0 -66
- data/test/buttons.html +0 -189
- data/test/clearing.html +0 -85
- data/test/config.rb +0 -11
- data/test/elements.html +0 -490
- data/test/forms.html +0 -371
- data/test/grid.html +0 -543
- data/test/images/orbit-demo/demo1.jpeg +0 -0
- data/test/images/orbit-demo/demo2.jpeg +0 -0
- data/test/images/orbit-demo/demo3.jpeg +0 -0
- data/test/images/orbit-demo/slider-background.jpeg +0 -0
- data/test/index.html +0 -83
- data/test/joyride.html +0 -127
- data/test/magellan.html +0 -112
- data/test/navigation.html +0 -269
- data/test/orbit.html +0 -112
- data/test/reveal.html +0 -91
- data/test/scss/_settings.scss +0 -245
- data/test/scss/styles.scss +0 -50
- data/test/tabs.html +0 -197
- data/test/template.html +0 -52
- data/test/topbar-login.html +0 -194
- data/test/topbar.html +0 -139
- data/test/type.html +0 -188
- data/vendor/assets/images/foundation/orbit/bullets.jpg +0 -0
- data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/left-arrow.png +0 -0
- data/vendor/assets/images/foundation/orbit/loading.gif +0 -0
- data/vendor/assets/images/foundation/orbit/mask-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/pause-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
- data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
- data/vendor/assets/images/foundation/orbit/rotator-black.png +0 -0
- data/vendor/assets/images/foundation/orbit/timer-black.png +0 -0
- data/vendor/assets/javascripts/foundation/app.js +0 -41
- data/vendor/assets/javascripts/foundation/index.js +0 -19
- data/vendor/assets/javascripts/foundation/jquery.event.move.js +0 -580
- data/vendor/assets/javascripts/foundation/jquery.event.swipe.js +0 -130
- data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +0 -47
- data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +0 -20
- data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +0 -83
- data/vendor/assets/javascripts/foundation/jquery.foundation.clearing.js +0 -413
- data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +0 -502
- data/vendor/assets/javascripts/foundation/jquery.foundation.joyride.js +0 -639
- data/vendor/assets/javascripts/foundation/jquery.foundation.magellan.js +0 -96
- data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +0 -27
- data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +0 -55
- data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +0 -919
- data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +0 -794
- data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +0 -66
- data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +0 -211
- data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +0 -174
- data/vendor/assets/javascripts/foundation/jquery.js +0 -9555
- data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +0 -50
data/lib/foundation/engine.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
module Foundation
|
2
2
|
class Engine < Rails::Engine
|
3
|
-
# auto wire assets
|
3
|
+
# auto wire assets
|
4
|
+
initializer 'foundation.update_asset_paths' do |app|
|
5
|
+
app.config.assets.paths << File.expand_path("../../../scss", __FILE__)
|
6
|
+
app.config.assets.paths << File.expand_path("../../../js", __FILE__)
|
7
|
+
|
8
|
+
# Ensure Zepto and Modernizr are precompiled in production
|
9
|
+
app.config.assets.precompile += %w(vendor/zepto.js vendor/custom.modernizr.js)
|
10
|
+
end
|
4
11
|
end
|
5
12
|
end
|
@@ -4,9 +4,16 @@ module Foundation
|
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
6
|
source_root File.join(File.dirname(__FILE__), 'templates')
|
7
|
+
argument :layout_name, :type => :string, :default => 'application', :banner => 'layout_name'
|
8
|
+
|
9
|
+
class_option :haml, :desc => 'Generate HAML layout instead of ERB.', :type => :boolean
|
10
|
+
class_option :slim, :desc => 'Generate Slim layout instead of ERB.', :type => :boolean
|
7
11
|
|
8
|
-
def add_assets
|
12
|
+
def add_assets
|
13
|
+
# rails_ujs breaks, need to incorporate rails-behavior plugin for this to work seamlessly
|
14
|
+
# gsub_file "app/assets/javascripts/application#{detect_js_format[0]}", /\/\/= require jquery\n/, ""
|
9
15
|
insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require foundation\n", :after => "jquery_ujs\n"
|
16
|
+
append_to_file "app/assets/javascripts/application#{detect_js_format[0]}", "\n$(document).foundation();\n"
|
10
17
|
settings_file = File.join(File.dirname(__FILE__),"..","..","..","templates","project","scss","_settings.scss")
|
11
18
|
create_file "app/assets/stylesheets/foundation_and_overrides.scss", File.read(settings_file)
|
12
19
|
append_to_file "app/assets/stylesheets/foundation_and_overrides.scss", "\n@import 'foundation';\n"
|
@@ -25,6 +32,22 @@ module Foundation
|
|
25
32
|
return ['.css.scss', ' //='] if File.exist?('app/assets/stylesheets/application.css.scss')
|
26
33
|
return ['.scss', ' //='] if File.exist?('app/assets/stylesheets/application.scss')
|
27
34
|
end
|
35
|
+
|
36
|
+
def create_layout
|
37
|
+
if options.haml?
|
38
|
+
template 'application.html.haml', "app/views/layouts/#{file_name}.html.haml"
|
39
|
+
elsif options.slim?
|
40
|
+
template 'application.html.slim', "app/views/layouts/#{file_name}.html.slim"
|
41
|
+
else
|
42
|
+
template 'application.html.erb', "app/views/layouts/#{file_name}.html.erb"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def file_name
|
49
|
+
layout_name.underscore.downcase
|
50
|
+
end
|
28
51
|
end
|
29
52
|
end
|
30
53
|
end
|
@@ -14,16 +14,30 @@
|
|
14
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
15
15
|
|
16
16
|
<title><%%= content_for?(:title) ? yield(:title) : "Untitled" %></title>
|
17
|
-
|
18
|
-
<!-- Included CSS Files -->
|
17
|
+
|
19
18
|
<%%= stylesheet_link_tag "application" %>
|
20
|
-
|
21
|
-
<!-- Included JS Files -->
|
22
|
-
<%%= javascript_include_tag "application" %>
|
23
|
-
|
19
|
+
<%%= javascript_include_tag "vendor/custom.modernizr" %>
|
24
20
|
<%%= csrf_meta_tags %>
|
25
21
|
</head>
|
26
22
|
<body>
|
27
23
|
<%%= yield %>
|
24
|
+
<% if false %>
|
25
|
+
<script>
|
26
|
+
document.write('<script src=' +
|
27
|
+
('__proto__' in {} ? '<%%= asset_path("vendor/zepto") %>' : '<%%= asset_path("jquery") %>') +
|
28
|
+
'><\/script>');
|
29
|
+
</script>
|
30
|
+
|
31
|
+
<script>
|
32
|
+
// Ensure rails_ujs works with Zepto
|
33
|
+
$.fn.ajaxSend = function(callback) {
|
34
|
+
return this.each(function(){
|
35
|
+
$(this).on('ajaxBeforeSend', callback);
|
36
|
+
});
|
37
|
+
};
|
38
|
+
var jQuery = $;
|
39
|
+
</script>
|
40
|
+
<% end %>
|
41
|
+
<%%= javascript_include_tag "application" %>
|
28
42
|
</body>
|
29
43
|
</html>
|
@@ -17,13 +17,9 @@
|
|
17
17
|
|
18
18
|
%title= content_for?(:title) ? yield(:title) : "Untitled"
|
19
19
|
|
20
|
-
-# Included CSS Files
|
21
20
|
= stylesheet_link_tag "application"
|
22
|
-
|
23
|
-
-# Included JS Files
|
24
|
-
= javascript_include_tag "application"
|
25
|
-
|
26
21
|
= csrf_meta_tag
|
27
22
|
|
28
23
|
%body
|
29
|
-
= yield
|
24
|
+
= yield
|
25
|
+
= javascript_include_tag "application"
|
@@ -17,14 +17,11 @@ head
|
|
17
17
|
|
18
18
|
title= content_for?(:title) ? yield(:title) : "Untitled"
|
19
19
|
|
20
|
-
/ Included CSS Files
|
21
20
|
= stylesheet_link_tag "application"
|
22
21
|
|
23
|
-
/ Included JS Files
|
24
|
-
= javascript_include_tag "application"
|
25
|
-
|
26
22
|
= csrf_meta_tag
|
27
23
|
|
28
24
|
body
|
29
25
|
.container
|
30
|
-
== yield
|
26
|
+
== yield
|
27
|
+
= javascript_include_tag "application"
|
data/lib/foundation/version.rb
CHANGED
data/lib/zurb-foundation.rb
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
root = File.join(File.dirname(__FILE__), "..")
|
2
2
|
require "foundation/version"
|
3
|
-
require "compass"
|
4
|
-
require "modular-scale"
|
5
|
-
|
6
|
-
Compass::Frameworks.register("foundation",
|
7
|
-
:stylesheets_directory => File.join(root,"scss"),
|
8
|
-
:templates_directory => File.join(root,"templates"),
|
9
|
-
:images_dir => File.join(root,"vendor","assets","images","foundation")
|
10
|
-
)
|
11
3
|
|
12
4
|
if defined?(Rails)
|
13
|
-
require "foundation/generators/layout_generator"
|
14
5
|
require "foundation/generators/install_generator"
|
15
6
|
end
|
16
7
|
|
17
8
|
module Foundation
|
18
9
|
require "foundation/engine" if defined?(Rails)
|
19
10
|
end
|
11
|
+
|
12
|
+
if defined?(Compass)
|
13
|
+
Compass::Frameworks.register("foundation",
|
14
|
+
:stylesheets_directory => File.join(root,"scss"),
|
15
|
+
:templates_directory => File.join(root,"templates")
|
16
|
+
)
|
17
|
+
end
|
data/package.json
ADDED
data/scss/foundation.scss
CHANGED
@@ -1,20 +1,47 @@
|
|
1
|
+
// Make sure the charset is set appropriately
|
1
2
|
@charset "UTF-8";
|
2
|
-
// Foundation Features
|
3
|
-
// =============
|
4
3
|
|
5
|
-
|
4
|
+
// This includes all of the foundation global elements that are needed to work with any of the other files.
|
5
|
+
//
|
6
|
+
// RENAME THIS TO _foundation-global.scss ONCE ALL THE OLD VARIABLES ARE OUT OF THE FILE.
|
7
|
+
@import "foundation/foundation-global";
|
8
|
+
|
9
|
+
// Foundation Components
|
10
|
+
@import
|
11
|
+
"foundation/components/grid",
|
12
|
+
"foundation/components/visibility",
|
13
|
+
"foundation/components/block-grid",
|
14
|
+
"foundation/components/type",
|
15
|
+
"foundation/components/buttons",
|
16
|
+
"foundation/components/forms",
|
17
|
+
"foundation/components/custom-forms",
|
18
|
+
"foundation/components/button-groups",
|
19
|
+
"foundation/components/dropdown-buttons",
|
20
|
+
"foundation/components/split-buttons",
|
21
|
+
"foundation/components/flex-video",
|
22
|
+
"foundation/components/section",
|
23
|
+
"foundation/components/top-bar",
|
24
|
+
"foundation/components/orbit",
|
25
|
+
"foundation/components/reveal",
|
26
|
+
"foundation/components/joyride",
|
27
|
+
"foundation/components/clearing",
|
28
|
+
"foundation/components/alert-boxes",
|
29
|
+
"foundation/components/breadcrumbs",
|
30
|
+
"foundation/components/keystrokes",
|
31
|
+
"foundation/components/labels",
|
32
|
+
"foundation/components/inline-lists",
|
33
|
+
"foundation/components/pagination",
|
34
|
+
"foundation/components/panels",
|
35
|
+
"foundation/components/pricing-tables",
|
36
|
+
"foundation/components/progress-bars",
|
37
|
+
"foundation/components/side-nav",
|
38
|
+
"foundation/components/sub-nav",
|
39
|
+
"foundation/components/switch",
|
40
|
+
"foundation/components/magellan",
|
41
|
+
"foundation/components/tables",
|
42
|
+
"foundation/components/thumbs",
|
43
|
+
"foundation/components/tooltips",
|
44
|
+
"foundation/components/dropdown";
|
6
45
|
|
7
|
-
@import "modular-scale";
|
8
46
|
|
9
|
-
@import "foundation/functions/all";
|
10
47
|
|
11
|
-
@import "foundation/settings";
|
12
|
-
|
13
|
-
@import "foundation/mixins/all";
|
14
|
-
|
15
|
-
@import "foundation/common/base";
|
16
|
-
|
17
|
-
@import "foundation/components/grid", "foundation/components/modules/all";
|
18
|
-
|
19
|
-
// Media Queries Overrides
|
20
|
-
@import "foundation/components/modules/mqueries";
|
@@ -0,0 +1,226 @@
|
|
1
|
+
// Foundation Global Function, Variables and Mixins
|
2
|
+
//
|
3
|
+
// Variables
|
4
|
+
//
|
5
|
+
|
6
|
+
// This is the default html and body font-size for the base em value.
|
7
|
+
$em-base: 16px !default;
|
8
|
+
|
9
|
+
// We use these to control various global styles
|
10
|
+
$body-bg: #fff !default;
|
11
|
+
$body-font-color: #222 !default;
|
12
|
+
$body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
|
13
|
+
$body-font-weight: normal !default;
|
14
|
+
$body-font-style: normal !default;
|
15
|
+
|
16
|
+
// We use this to control font-smoothing
|
17
|
+
$font-smoothing: antialiased !default;
|
18
|
+
|
19
|
+
// We use these to control text direction settings
|
20
|
+
$text-direction: ltr !default; // Controls default global text direction, 'rtl' or 'ltr'
|
21
|
+
$default-float: left !default;
|
22
|
+
$default-opposite: right !default;
|
23
|
+
// No need to change this conditional statement, $text-direction variable controls it all.
|
24
|
+
@if $text-direction == ltr {
|
25
|
+
$default-float: left;
|
26
|
+
$default-opposite: right;
|
27
|
+
} @else {
|
28
|
+
$default-float: right;
|
29
|
+
$default-opposite: left;
|
30
|
+
}
|
31
|
+
|
32
|
+
// We use these as default colors throughout
|
33
|
+
$primary-color: #2ba6cb !default;
|
34
|
+
$secondary-color: #e9e9e9 !default;
|
35
|
+
$alert-color: #c60f13 !default;
|
36
|
+
$success-color: #5da423 !default;
|
37
|
+
|
38
|
+
// We use these to make sure border radius matches unless we want it different.
|
39
|
+
$global-radius: 3px !default;
|
40
|
+
$global-rounded: 1000px !default;
|
41
|
+
|
42
|
+
// We use these to control inset shadow shiny edges and depressions.
|
43
|
+
$shiny-edge-size: 0 1px 0 !default;
|
44
|
+
$shiny-edge-color: rgba(#fff, .5) !default;
|
45
|
+
$shiny-edge-active-color: rgba(#000, .2) !default;
|
46
|
+
|
47
|
+
// We use this to control whether or not CSS classes come through in the gem files.
|
48
|
+
$include-html-classes: true !default;
|
49
|
+
$include-print-styles: true !default;
|
50
|
+
|
51
|
+
|
52
|
+
//
|
53
|
+
// Functions
|
54
|
+
//
|
55
|
+
|
56
|
+
// Working in ems is annoying. Think in pixels by using this handy function, emCalc(#px)
|
57
|
+
@function emCalc($pxWidth) {
|
58
|
+
@return $pxWidth / $em-base * 1em;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Creating rems and pixels
|
62
|
+
@function remCalc($pxWidth) {
|
63
|
+
@return $pxWidth / $em-base * 1rem;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Grid Calculation for Percentages
|
67
|
+
@function gridCalc($colNumber, $totalColumns) {
|
68
|
+
@return percentage(($colNumber / $totalColumns));
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
//
|
73
|
+
// Mixins
|
74
|
+
//
|
75
|
+
|
76
|
+
// We use this to control border radius.
|
77
|
+
@mixin radius($radius:$global-radius) {
|
78
|
+
@if $radius {
|
79
|
+
-webkit-border-radius: $radius;
|
80
|
+
border-radius: $radius;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
// We use this to create equal side border radius on elements.
|
85
|
+
@mixin side-radius($side, $radius) {
|
86
|
+
@if $side == left {
|
87
|
+
-webkit-border-radius: $radius 0 0 $radius;
|
88
|
+
border-radius: $radius 0 0 $radius;
|
89
|
+
}
|
90
|
+
@else if $side == right {
|
91
|
+
-webkit-border-radius: 0 $radius $radius 0;
|
92
|
+
border-radius: 0 $radius $radius 0;
|
93
|
+
}
|
94
|
+
@else if $side == top {
|
95
|
+
-webkit-border-radius: $radius $radius 0 0;
|
96
|
+
border-radius: $radius $radius 0 0;
|
97
|
+
}
|
98
|
+
@else if $side == bottom {
|
99
|
+
-webkit-border-radius: 0 0 $radius $radius;
|
100
|
+
border-radius: 0 0 $radius $radius;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
// We can control whether or not we have inset shadows edges.
|
105
|
+
@mixin inset-shadow($active:true) {
|
106
|
+
-webkit-box-shadow: $shiny-edge-size $shiny-edge-color inset;
|
107
|
+
box-shadow: $shiny-edge-size $shiny-edge-color inset;
|
108
|
+
|
109
|
+
@if $active { &:active {
|
110
|
+
-webkit-box-shadow: $shiny-edge-size $shiny-edge-active-color inset;
|
111
|
+
box-shadow: $shiny-edge-size $shiny-edge-active-color inset; } }
|
112
|
+
}
|
113
|
+
|
114
|
+
// We use this to add transitions to elements
|
115
|
+
@mixin single-transition($property:all, $speed:300ms, $ease:ease-out) {
|
116
|
+
-webkit-transition: $property $speed $ease;
|
117
|
+
-moz-transition: $property $speed $ease;
|
118
|
+
transition: $property $speed $ease;
|
119
|
+
}
|
120
|
+
|
121
|
+
// We use this to add box-sizing across browser prefixes
|
122
|
+
@mixin box-sizing($type:border-box) {
|
123
|
+
-moz-box-sizing: $type;
|
124
|
+
-webkit-box-sizing: $type;
|
125
|
+
box-sizing: $type;
|
126
|
+
}
|
127
|
+
|
128
|
+
// We use this to create equalateral triangles
|
129
|
+
@mixin css-triangle($triangle-size, $triangle-color, $triangle-direction) {
|
130
|
+
content: "";
|
131
|
+
display: block;
|
132
|
+
width: 0;
|
133
|
+
height: 0;
|
134
|
+
border: solid $triangle-size;
|
135
|
+
@if ($triangle-direction == top) {
|
136
|
+
border-color: $triangle-color transparent transparent transparent;
|
137
|
+
}
|
138
|
+
@if ($triangle-direction == bottom) {
|
139
|
+
border-color: transparent transparent $triangle-color transparent;
|
140
|
+
}
|
141
|
+
@if ($triangle-direction == left) {
|
142
|
+
border-color: transparent transparent transparent $triangle-color;
|
143
|
+
}
|
144
|
+
@if ($triangle-direction == right) {
|
145
|
+
border-color: transparent $triangle-color transparent transparent;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
// We use this to do clear floats
|
150
|
+
@mixin clearfix() {
|
151
|
+
*zoom:1;
|
152
|
+
&:before, &:after { content: " "; display: table; }
|
153
|
+
&:after { clear: both; }
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
// Set box-sizing globally to handle padding and border widths
|
158
|
+
*,
|
159
|
+
*:before,
|
160
|
+
*:after {
|
161
|
+
@include box-sizing(border-box);
|
162
|
+
}
|
163
|
+
|
164
|
+
html,
|
165
|
+
body { font-size: $em-base; }
|
166
|
+
|
167
|
+
// Default body styles
|
168
|
+
body {
|
169
|
+
background: $body-bg;
|
170
|
+
color: $body-font-color;
|
171
|
+
padding: 0;
|
172
|
+
font-family: $body-font-family;
|
173
|
+
font-weight: $body-font-weight;
|
174
|
+
font-style: $body-font-style;
|
175
|
+
line-height: 1;
|
176
|
+
-webkit-font-smoothing: $font-smoothing;
|
177
|
+
}
|
178
|
+
|
179
|
+
// Grid Defaults to get images and embeds to work properly
|
180
|
+
img,
|
181
|
+
object,
|
182
|
+
embed { max-width: 100%; height: auto; }
|
183
|
+
|
184
|
+
object,
|
185
|
+
embed { height: 100%; }
|
186
|
+
img { -ms-interpolation-mode: bicubic; }
|
187
|
+
|
188
|
+
#map_canvas,
|
189
|
+
.map_canvas {
|
190
|
+
img,
|
191
|
+
embed,
|
192
|
+
object { max-width: none !important;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
// Miscellaneous useful HTML classes
|
197
|
+
.left { float: left; }
|
198
|
+
.right { float: right; }
|
199
|
+
.text-left { text-align: left; }
|
200
|
+
.text-right { text-align: right; }
|
201
|
+
.text-center { text-align: center; }
|
202
|
+
.text-justify { text-align: justify; }
|
203
|
+
.hide { display: none; }
|
204
|
+
|
205
|
+
// Get rid of gap under images by making them display: block; by default
|
206
|
+
img { display: block; }
|
207
|
+
|
208
|
+
//
|
209
|
+
// Global resets for forms
|
210
|
+
//
|
211
|
+
|
212
|
+
// Make sure textarea takes on height automatically
|
213
|
+
textarea { height: auto; min-height: 50px; }
|
214
|
+
|
215
|
+
// Make select elements 100% width by default
|
216
|
+
select { width: 100%; }
|
217
|
+
|
218
|
+
|
219
|
+
// Media Queries
|
220
|
+
$small-screen: emCalc(768px) !default;
|
221
|
+
$medium-screen: emCalc(1280px) !default;
|
222
|
+
$large-screen: emCalc(1440px) !default;
|
223
|
+
|
224
|
+
$small: "only screen and (min-width:"#{$small-screen}")" !default;
|
225
|
+
$medium: "only screen and (min-width:"#{$medium-screen}")" !default;
|
226
|
+
$large: "only screen and (min-width:"#{$large-screen}")" !default;
|