bourbon 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/_bourbon.scss +1 -1
- data/app/assets/stylesheets/css3/_linear-gradient.scss +12 -2
- data/app/assets/stylesheets/functions/_modular_scale.scss +40 -0
- data/lib/bourbon/version.rb +1 -1
- data/readme.md +6 -3
- metadata +7 -7
- data/app/assets/stylesheets/functions/_golden-ratio.scss +0 -31
@@ -2,7 +2,8 @@
|
|
2
2
|
$G3: false, $G4: false,
|
3
3
|
$G5: false, $G6: false,
|
4
4
|
$G7: false, $G8: false,
|
5
|
-
$G9: false, $G10: false
|
5
|
+
$G9: false, $G10: false,
|
6
|
+
$fallback: false) {
|
6
7
|
// Detect what type of value exists in $pos
|
7
8
|
$pos-type: type-of(nth($pos, 1));
|
8
9
|
|
@@ -15,7 +16,15 @@
|
|
15
16
|
|
16
17
|
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
17
18
|
|
18
|
-
|
19
|
+
// Set $G1 as the default fallback color
|
20
|
+
$fallback-color: nth($G1, 1);
|
21
|
+
|
22
|
+
// If $fallback is a color use that color as the fallback color
|
23
|
+
@if type-of($fallback) == color {
|
24
|
+
$fallback-color: $fallback;
|
25
|
+
}
|
26
|
+
|
27
|
+
background-color: $fallback-color;
|
19
28
|
background-image: deprecated-webkit-gradient(linear, $full); // Safari <= 5.0
|
20
29
|
background-image: -webkit-linear-gradient($pos, $full); // Safari 5.1+, Chrome
|
21
30
|
background-image: -moz-linear-gradient($pos, $full);
|
@@ -27,5 +36,6 @@
|
|
27
36
|
|
28
37
|
// Usage: Gradient position is optional, default is top. Position can be a degree. Color stops are optional as well.
|
29
38
|
// @include linear-gradient(#1e5799, #2989d8);
|
39
|
+
// @include linear-gradient(#1e5799, #2989d8, $fallback:#2989d8);
|
30
40
|
// @include linear-gradient(top, #1e5799 0%, #2989d8 50%);
|
31
41
|
// @include linear-gradient(50deg, rgba(10, 10, 10, 0.5) 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@function modular-scale($value, $increment, $ratio) {
|
2
|
+
@if $increment > 0 {
|
3
|
+
@for $i from 1 through $increment {
|
4
|
+
$value: ($value * $ratio);
|
5
|
+
}
|
6
|
+
}
|
7
|
+
|
8
|
+
@if $increment < 0 {
|
9
|
+
$increment: abs($increment);
|
10
|
+
@for $i from 1 through $increment {
|
11
|
+
$value: ($value / $ratio);
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
@return $value;
|
16
|
+
}
|
17
|
+
|
18
|
+
// div {
|
19
|
+
// Increment Up GR with positive value
|
20
|
+
// font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px
|
21
|
+
//
|
22
|
+
// Increment Down GR with negative value
|
23
|
+
// font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px
|
24
|
+
//
|
25
|
+
// Can be used with ceil(round up) or floor(round down)
|
26
|
+
// font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px
|
27
|
+
// font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px
|
28
|
+
// }
|
29
|
+
//
|
30
|
+
// modularscale.com
|
31
|
+
|
32
|
+
@function golden-ratio($value, $increment) {
|
33
|
+
@return modular-scale($value, $increment, 1.618)
|
34
|
+
}
|
35
|
+
|
36
|
+
// div {
|
37
|
+
// font-size: golden-ratio(14px, 1); // returns: 22.652px
|
38
|
+
// }
|
39
|
+
//
|
40
|
+
// goldenratiocalculator.com
|
data/lib/bourbon/version.rb
CHANGED
data/readme.md
CHANGED
@@ -18,6 +18,8 @@ Then run:
|
|
18
18
|
|
19
19
|
$ bundle install
|
20
20
|
|
21
|
+
Bourbon On [RubyGems](https://rubygems.org/gems/bourbon)
|
22
|
+
|
21
23
|
## Rails 3.1.x
|
22
24
|
|
23
25
|
Rename application.css to application.css.scss:
|
@@ -39,7 +41,7 @@ Import all additional stylesheets from your app/assets/stylesheets directory und
|
|
39
41
|
@import "home";
|
40
42
|
@import "users";
|
41
43
|
|
42
|
-
## Rails 3.0.
|
44
|
+
## Rails 3.0.x and below
|
43
45
|
For Rails < 3.1 you must run the installation rake task. Please note, you should run this task every time a new version of Bourbon is released.
|
44
46
|
This will copy the Sass files into your project's public/stylesheets/sass directory.
|
45
47
|
|
@@ -53,7 +55,7 @@ Import the mixins at the beginning of your stylesheet
|
|
53
55
|
|
54
56
|
rake bourbon:install[app/stylesheets]
|
55
57
|
|
56
|
-
# Install
|
58
|
+
# Install in a non-rails project (static site, jekyll, wordpress, other...)
|
57
59
|
Bourbon includes an easy way to generate a directory with all the necessary files.
|
58
60
|
Install the bourbon gem:
|
59
61
|
|
@@ -90,13 +92,14 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
90
92
|
|
91
93
|
|
92
94
|
# All Supported Functions, Mixins, and Addons
|
93
|
-
[View the Bourbon documentation](http://thoughtbot.com/bourbon)
|
95
|
+
[View the Bourbon documentation](http://thoughtbot.com/bourbon)
|
94
96
|
|
95
97
|
*@ denotes a mixin and must be prefaced with @include*
|
96
98
|
|
97
99
|
#Functions
|
98
100
|
--------------------------------
|
99
101
|
compact(*args)
|
102
|
+
modular-scale(*args)
|
100
103
|
golden-ratio(*args)
|
101
104
|
grid-width(*args)
|
102
105
|
linear-gradient(*args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bourbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -19,11 +19,11 @@ authors:
|
|
19
19
|
autorequire:
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
|
-
date: 2012-01-
|
22
|
+
date: 2012-01-23 00:00:00.000000000 Z
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
25
|
name: sass
|
26
|
-
requirement: &
|
26
|
+
requirement: &70155229817940 !ruby/object:Gem::Requirement
|
27
27
|
none: false
|
28
28
|
requirements:
|
29
29
|
- - ! '>='
|
@@ -31,10 +31,10 @@ dependencies:
|
|
31
31
|
version: '3.1'
|
32
32
|
type: :runtime
|
33
33
|
prerelease: false
|
34
|
-
version_requirements: *
|
34
|
+
version_requirements: *70155229817940
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: aruba
|
37
|
-
requirement: &
|
37
|
+
requirement: &70155229817440 !ruby/object:Gem::Requirement
|
38
38
|
none: false
|
39
39
|
requirements:
|
40
40
|
- - ~>
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: '0.4'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
|
-
version_requirements: *
|
45
|
+
version_requirements: *70155229817440
|
46
46
|
description: ! 'The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive
|
47
47
|
framework of
|
48
48
|
|
@@ -91,9 +91,9 @@ files:
|
|
91
91
|
- app/assets/stylesheets/css3/_transform.scss
|
92
92
|
- app/assets/stylesheets/css3/_transition.scss
|
93
93
|
- app/assets/stylesheets/functions/_deprecated-webkit-gradient.scss
|
94
|
-
- app/assets/stylesheets/functions/_golden-ratio.scss
|
95
94
|
- app/assets/stylesheets/functions/_grid-width.scss
|
96
95
|
- app/assets/stylesheets/functions/_linear-gradient.scss
|
96
|
+
- app/assets/stylesheets/functions/_modular_scale.scss
|
97
97
|
- app/assets/stylesheets/functions/_radial-gradient.scss
|
98
98
|
- app/assets/stylesheets/functions/_tint-shade.scss
|
99
99
|
- bin/bourbon
|
@@ -1,31 +0,0 @@
|
|
1
|
-
@function golden-ratio($value, $increment) {
|
2
|
-
@if $increment > 0 {
|
3
|
-
@for $i from 1 through $increment {
|
4
|
-
$value: ($value * 1.618);
|
5
|
-
}
|
6
|
-
}
|
7
|
-
|
8
|
-
@if $increment < 0 {
|
9
|
-
$increment: abs($increment);
|
10
|
-
@for $i from 1 through $increment {
|
11
|
-
$value: ($value / 1.618);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
@return $value;
|
16
|
-
}
|
17
|
-
|
18
|
-
// div {
|
19
|
-
// Increment Up GR with positive value
|
20
|
-
// font-size: golden-ratio(14px, 1); // returns: 22.652px
|
21
|
-
//
|
22
|
-
// Increment Down GR with negative value
|
23
|
-
// font-size: golden-ratio(14px, -1); // returns: 8.653px
|
24
|
-
//
|
25
|
-
// Can be used with ceil(round up) or floor(round down)
|
26
|
-
// font-size: floor( golden-ratio(14px, 1) ); // returns: 22px
|
27
|
-
// font-size: ceil( golden-ratio(14px, 1) ); // returns: 23px
|
28
|
-
// }
|
29
|
-
//
|
30
|
-
// modularscale.com
|
31
|
-
// goldenratiocalculator.com
|