foundation-sass-rails 5.5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +37 -0
- data/LICENSE.txt +21 -0
- data/README.md +62 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/foundation-sass-rails.gemspec +29 -0
- data/lib/foundation-sass-rails.rb +8 -0
- data/lib/foundation/version.rb +5 -0
- data/lib/generators/foundation/overrides_generator.rb +39 -0
- data/vendor/assets/stylesheets/foundation.scss +42 -0
- data/vendor/assets/stylesheets/foundation/_functions.scss +156 -0
- data/vendor/assets/stylesheets/foundation/_settings.scss +1489 -0
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +161 -0
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +133 -0
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +132 -0
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +208 -0
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +261 -0
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +260 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +130 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +269 -0
- data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +51 -0
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +607 -0
- data/vendor/assets/stylesheets/foundation/components/_global.scss +566 -0
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +292 -0
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +460 -0
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +58 -0
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +220 -0
- data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +60 -0
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +106 -0
- data/vendor/assets/stylesheets/foundation/components/_magellan.scss +34 -0
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +606 -0
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +388 -0
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +163 -0
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +107 -0
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +150 -0
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +85 -0
- data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +177 -0
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +212 -0
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +120 -0
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +203 -0
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +125 -0
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +241 -0
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +135 -0
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +142 -0
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +66 -0
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +745 -0
- data/vendor/assets/stylesheets/foundation/components/_type.scss +525 -0
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +425 -0
- data/vendor/assets/stylesheets/normalize.scss +424 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af1050a08eb02df98448a5a1d347f9e1e0b5edcc
|
4
|
+
data.tar.gz: 0cdda38bebee7fb556e6b1f5773c717ea04a310a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c25731748c2d586aca6d80dee2ae8d6fe7c0c8261773b8ff5c1b2749765b80dd8fb08c483e9705bd811e116ada87f4a4e59606f49a7b6c06f6bd1294dfa36043
|
7
|
+
data.tar.gz: 4dbd7442427e46897faadf1241acebb8f2ee6f2bc4b3b30c3823d2243f0362d46cd283ac64a9ef7162f64a0d0c831942609a248127c88c60a6af5113c1d2c6c6
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
foundation-sass-rails (0.1.0)
|
5
|
+
sass (>= 3.3.0, < 3.5)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.3)
|
11
|
+
rake (10.5.0)
|
12
|
+
rspec (3.7.0)
|
13
|
+
rspec-core (~> 3.7.0)
|
14
|
+
rspec-expectations (~> 3.7.0)
|
15
|
+
rspec-mocks (~> 3.7.0)
|
16
|
+
rspec-core (3.7.1)
|
17
|
+
rspec-support (~> 3.7.0)
|
18
|
+
rspec-expectations (3.7.0)
|
19
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
+
rspec-support (~> 3.7.0)
|
21
|
+
rspec-mocks (3.7.0)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.7.0)
|
24
|
+
rspec-support (3.7.1)
|
25
|
+
sass (3.4.25)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
bundler (~> 1.16)
|
32
|
+
foundation-sass-rails!
|
33
|
+
rake (~> 10.0)
|
34
|
+
rspec (~> 3.0)
|
35
|
+
|
36
|
+
BUNDLED WITH
|
37
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Jesse Chavez
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Foundation Sass Rails
|
2
|
+
|
3
|
+
This gem adds only the Sass part of Foundation 5 to a Rails project.
|
4
|
+
|
5
|
+
The version of this gem is the same as Foundation.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'foundation-sass-rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install foundation-sass-rails
|
22
|
+
|
23
|
+
## Basic Usage
|
24
|
+
|
25
|
+
Add the following line in your `application.css`
|
26
|
+
|
27
|
+
```scss
|
28
|
+
/*= require foundation
|
29
|
+
```
|
30
|
+
|
31
|
+
Or if you have `application.scss`
|
32
|
+
|
33
|
+
|
34
|
+
```scss
|
35
|
+
@import "foundation";
|
36
|
+
```
|
37
|
+
|
38
|
+
## Advance Usage
|
39
|
+
|
40
|
+
If you need the overrides foundation file.
|
41
|
+
|
42
|
+
```shell
|
43
|
+
rails generate foundation:overrides
|
44
|
+
```
|
45
|
+
|
46
|
+
That will create a file called `foundation_and_overrides.scss`. Now add the following line
|
47
|
+
to your `application.scss`
|
48
|
+
|
49
|
+
|
50
|
+
```scss
|
51
|
+
@import "foundation_and_overrides";
|
52
|
+
```
|
53
|
+
|
54
|
+
## Contributing
|
55
|
+
|
56
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/JessChavez/foundation-sass-rails.
|
57
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
58
|
+
and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "foundation/sass/rails"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'foundation/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'foundation-sass-rails'
|
8
|
+
spec.version = Foundation::Sass::VERSION
|
9
|
+
spec.authors = ['Jesse Chavez']
|
10
|
+
spec.email = ['jesse.chavez.r@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = %q{Foundation Sass}
|
13
|
+
spec.description = %q{This gem add only the Sass part of Foundation frontend framework to a Rails project.}
|
14
|
+
spec.homepage = 'https://github.com/JesseChavez/foundation-sass-rails'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency 'sass', ['>= 3.3.0', '< 3.5']
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Foundation
|
4
|
+
module Generators
|
5
|
+
class OverridesGenerator < ::Rails::Generators::Base
|
6
|
+
# creates the foundation overrides file
|
7
|
+
def add_overrides
|
8
|
+
create_file overrides_file, File.read(settings_file)
|
9
|
+
append_to_file overrides_file, "\n@import 'foundation';\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def settings_file
|
15
|
+
File.join(vendor_stylesheets_base_dir, 'foundation','_settings.scss')
|
16
|
+
end
|
17
|
+
|
18
|
+
def overrides_file
|
19
|
+
File.join(stylesheets_base_dir, 'foundation_and_overrides.scss')
|
20
|
+
end
|
21
|
+
|
22
|
+
def vendor_stylesheets_base_dir
|
23
|
+
File.join(
|
24
|
+
File.dirname(__FILE__),
|
25
|
+
'..',
|
26
|
+
'..',
|
27
|
+
'..',
|
28
|
+
'vendor',
|
29
|
+
'assets',
|
30
|
+
'stylesheets'
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
def stylesheets_base_dir
|
35
|
+
File.join('app', 'assets', 'stylesheets')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// Foundation by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
// Behold, here are all the Foundation components.
|
6
|
+
@import 'foundation/components/grid';
|
7
|
+
@import 'foundation/components/accordion';
|
8
|
+
@import 'foundation/components/alert-boxes';
|
9
|
+
@import 'foundation/components/block-grid';
|
10
|
+
@import 'foundation/components/breadcrumbs';
|
11
|
+
@import 'foundation/components/button-groups';
|
12
|
+
@import 'foundation/components/buttons';
|
13
|
+
@import 'foundation/components/clearing';
|
14
|
+
@import 'foundation/components/dropdown';
|
15
|
+
@import 'foundation/components/dropdown-buttons';
|
16
|
+
@import 'foundation/components/flex-video';
|
17
|
+
@import 'foundation/components/forms';
|
18
|
+
@import 'foundation/components/icon-bar';
|
19
|
+
@import 'foundation/components/inline-lists';
|
20
|
+
@import 'foundation/components/joyride';
|
21
|
+
@import 'foundation/components/keystrokes';
|
22
|
+
@import 'foundation/components/labels';
|
23
|
+
@import 'foundation/components/magellan';
|
24
|
+
@import 'foundation/components/orbit';
|
25
|
+
@import 'foundation/components/pagination';
|
26
|
+
@import 'foundation/components/panels';
|
27
|
+
@import 'foundation/components/pricing-tables';
|
28
|
+
@import 'foundation/components/progress-bars';
|
29
|
+
@import 'foundation/components/range-slider';
|
30
|
+
@import 'foundation/components/reveal';
|
31
|
+
@import 'foundation/components/side-nav';
|
32
|
+
@import 'foundation/components/split-buttons';
|
33
|
+
@import 'foundation/components/sub-nav';
|
34
|
+
@import 'foundation/components/switches';
|
35
|
+
@import 'foundation/components/tables';
|
36
|
+
@import 'foundation/components/tabs';
|
37
|
+
@import 'foundation/components/thumbs';
|
38
|
+
@import 'foundation/components/tooltips';
|
39
|
+
@import 'foundation/components/top-bar';
|
40
|
+
@import 'foundation/components/type';
|
41
|
+
@import 'foundation/components/offcanvas';
|
42
|
+
@import 'foundation/components/visibility';
|
@@ -0,0 +1,156 @@
|
|
1
|
+
// Foundation by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
// This is the default html and body font-size for the base rem value.
|
6
|
+
$rem-base: 16px !default;
|
7
|
+
|
8
|
+
// IMPORT ONCE
|
9
|
+
// We use this to prevent styles from being loaded multiple times for components that rely on other components.
|
10
|
+
$modules: () !default;
|
11
|
+
|
12
|
+
@mixin exports($name) {
|
13
|
+
// Import from global scope
|
14
|
+
$modules: $modules !global;
|
15
|
+
// Check if a module is already on the list
|
16
|
+
$module_index: index($modules, $name);
|
17
|
+
@if (($module_index == null) or ($module_index == false)) {
|
18
|
+
$modules: append($modules, $name) !global;
|
19
|
+
@content;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
//
|
24
|
+
// @functions
|
25
|
+
//
|
26
|
+
|
27
|
+
|
28
|
+
// RANGES
|
29
|
+
// We use these functions to define ranges for various things, like media queries.
|
30
|
+
@function lower-bound($range) {
|
31
|
+
@if length($range) <= 0 {
|
32
|
+
@return 0;
|
33
|
+
}
|
34
|
+
@return nth($range, 1);
|
35
|
+
}
|
36
|
+
|
37
|
+
@function upper-bound($range) {
|
38
|
+
@if length($range) < 2 {
|
39
|
+
@return 999999999999;
|
40
|
+
}
|
41
|
+
@return nth($range, 2);
|
42
|
+
}
|
43
|
+
|
44
|
+
// STRIP UNIT
|
45
|
+
// It strips the unit of measure and returns it
|
46
|
+
@function strip-unit($num) {
|
47
|
+
@return $num / ($num * 0 + 1);
|
48
|
+
}
|
49
|
+
|
50
|
+
// TEXT INPUT TYPES
|
51
|
+
|
52
|
+
@function text-inputs( $types: all, $selector: input ) {
|
53
|
+
|
54
|
+
$return: ();
|
55
|
+
|
56
|
+
$all-text-input-types:
|
57
|
+
text
|
58
|
+
password
|
59
|
+
date
|
60
|
+
datetime
|
61
|
+
datetime-local
|
62
|
+
month
|
63
|
+
week
|
64
|
+
email
|
65
|
+
number
|
66
|
+
search
|
67
|
+
tel
|
68
|
+
time
|
69
|
+
url
|
70
|
+
color
|
71
|
+
textarea;
|
72
|
+
|
73
|
+
@if $types == all { $types: $all-text-input-types; }
|
74
|
+
|
75
|
+
@each $type in $types {
|
76
|
+
@if $type == textarea {
|
77
|
+
@if $selector == input {
|
78
|
+
$return: append($return, unquote('#{$type}'), comma)
|
79
|
+
} @else {
|
80
|
+
$return: append($return, unquote('#{$type}#{$selector}'), comma)
|
81
|
+
}
|
82
|
+
} @else {
|
83
|
+
$return: append($return, unquote('#{$selector}[type="#{$type}"]'), comma)
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
@return $return;
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
// CONVERT TO REM
|
92
|
+
@function convert-to-rem($value, $base-value: $rem-base) {
|
93
|
+
$value: strip-unit($value) / strip-unit($base-value) * 1rem;
|
94
|
+
@if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
|
95
|
+
@return $value;
|
96
|
+
}
|
97
|
+
|
98
|
+
@function data($attr) {
|
99
|
+
@if $namespace {
|
100
|
+
@return '[data-' + $namespace + '-' + $attr + ']';
|
101
|
+
}
|
102
|
+
|
103
|
+
@return '[data-' + $attr + ']';
|
104
|
+
}
|
105
|
+
|
106
|
+
// REM CALC
|
107
|
+
|
108
|
+
// New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's.
|
109
|
+
// Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported:
|
110
|
+
//
|
111
|
+
// rem-calc(10 20 30px 40);
|
112
|
+
//
|
113
|
+
// Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets
|
114
|
+
//
|
115
|
+
// rem-calc((10, 20, 30, 40px));
|
116
|
+
//
|
117
|
+
// Optionally call with a different base (eg: 8px) to calculate rem.
|
118
|
+
//
|
119
|
+
// rem-calc(16px 32px 48px, 8px);
|
120
|
+
//
|
121
|
+
// If you require to comma separate your list
|
122
|
+
//
|
123
|
+
// rem-calc((16px, 32px, 48), 8px);
|
124
|
+
|
125
|
+
@function rem-calc($values, $base-value: $rem-base) {
|
126
|
+
$max: length($values);
|
127
|
+
|
128
|
+
@if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }
|
129
|
+
|
130
|
+
$remValues: ();
|
131
|
+
@for $i from 1 through $max {
|
132
|
+
$remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
|
133
|
+
}
|
134
|
+
@return $remValues;
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
@function em-calc($values, $base-value: $rem-base) {
|
139
|
+
$remValues: rem-calc($values, $base-value: $rem-base);
|
140
|
+
|
141
|
+
$max: length($remValues);
|
142
|
+
|
143
|
+
@if $max == 1 { @return strip-unit(nth($remValues, 1)) * 1em; }
|
144
|
+
|
145
|
+
$emValues: ();
|
146
|
+
@for $i from 1 through $max {
|
147
|
+
$emValues: append($emValues, strip-unit(nth($remValues, $i)) * 1em);
|
148
|
+
}
|
149
|
+
@return $emValues;
|
150
|
+
}
|
151
|
+
|
152
|
+
|
153
|
+
// Deprecated: OLD EM CALC
|
154
|
+
@function emCalc($values) {
|
155
|
+
@return em-calc($values);
|
156
|
+
}
|