groundworkcss 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -11,12 +11,11 @@
|
|
11
11
|
// =============================================
|
12
12
|
|
13
13
|
// file paths
|
14
|
-
// $root_path: "../"; path to HTML document root (relative from CSS)
|
15
|
-
// $images_path: "images/"; path to images (relative from $root_path)
|
16
|
-
// $fonts_path: "fonts/"; path to fonts (relative from $root_path)
|
17
|
-
// $boxsizing_path: "/js/libs/boxsizing.htc"; path to box sizing polyfill (change to absolute path from HTML document root)
|
18
|
-
// $PIE_path: "/js/libs/PIE.htc"; path to IE CSS3 polyfill (change to absolute path from HTML document root)
|
19
|
-
|
14
|
+
// $root_path: "../"; // path to HTML document root (relative from CSS)
|
15
|
+
// $images_path: "images/"; // path to images (relative from $root_path)
|
16
|
+
// $fonts_path: "fonts/"; // path to fonts (relative from $root_path)
|
17
|
+
// $boxsizing_path: "/js/libs/boxsizing.htc"; // path to box sizing polyfill (change to absolute path from HTML document root)
|
18
|
+
// $PIE_path: "/js/libs/PIE.htc"; // path to IE CSS3 polyfill (change to absolute path from HTML document root)
|
20
19
|
|
21
20
|
// =============================================
|
22
21
|
// Web Fonts
|
@@ -45,8 +44,8 @@
|
|
45
44
|
// Color Palette
|
46
45
|
// =============================================
|
47
46
|
|
48
|
-
// $white:
|
49
|
-
// $black:
|
47
|
+
// $white: #ffffff;
|
48
|
+
// $black: #111111;
|
50
49
|
|
51
50
|
// document
|
52
51
|
// $background-color: #ffffff;
|
@@ -198,7 +197,7 @@
|
|
198
197
|
// =============================================
|
199
198
|
|
200
199
|
// flexible box layout
|
201
|
-
// $flexbox-classes: true; enable output of flexbox classes
|
200
|
+
// $flexbox-classes: true; // enable output of flexbox classes
|
202
201
|
// $flexbox-helpers: "flex-wrapper" "flex-box" "vertical-center";
|
203
202
|
|
204
203
|
|
@@ -44,21 +44,52 @@ $font-family: Helvetica, Arial, Geneva, sans-serif !default;
|
|
44
44
|
*background-image: url("#{$root_path}#{$images_path}#{$file}"); // IE7- hack
|
45
45
|
}
|
46
46
|
|
47
|
-
//
|
48
|
-
@
|
49
|
-
@
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
47
|
+
// Return the modulo of two numbers
|
48
|
+
@function mod($dividend,$divisor) {
|
49
|
+
@return $dividend - (floor($dividend/$divisor)*$divisor);
|
50
|
+
}
|
51
|
+
|
52
|
+
// Return the corrected angle or position for a css gradient
|
53
|
+
@function angle($deg) {
|
54
|
+
@if type-of($deg) == 'number' {
|
55
|
+
@return mod(abs($deg - 450), 360deg);
|
54
56
|
} @else {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
$position: to + " ";
|
58
|
+
@each $pos in $deg {
|
59
|
+
$position: $position + opposite-position($pos) + " ";
|
60
|
+
}
|
61
|
+
@return $position;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin gradient($startColor: $white, $endColor: $gray-2, $direction: "top") {
|
66
|
+
$direction: unquote($direction);
|
67
|
+
$old: top;
|
68
|
+
$correct: to bottom;
|
69
|
+
|
70
|
+
@if(index($direction, unquote("to")) == 1) {
|
71
|
+
$correct: $direction;
|
72
|
+
@if(length($direction) == 2) {
|
73
|
+
$old: opposite-position(nth($direction, 2));
|
74
|
+
} @elseif(length($direction) == 3) {
|
75
|
+
$old: opposite-position(join(nth($direction, 2), nth($direction, 3)));
|
59
76
|
}
|
77
|
+
} @else {
|
78
|
+
$old: $direction;
|
79
|
+
$correct: angle($old); // handle both angles and old literals
|
80
|
+
// I'm not sure for the angle part though
|
81
|
+
// as it assumes that the mixin user is
|
82
|
+
// doing it wrong...
|
60
83
|
}
|
61
|
-
|
84
|
+
// works with compass 0.13.alpha.4
|
85
|
+
// @include background-image(linear-gradient($correct, $startColor, $endColor));
|
86
|
+
|
87
|
+
// works with compass 0.12
|
88
|
+
@include background-image(linear-gradient($old, $startColor, $endColor));
|
89
|
+
background-image: linear-gradient($correct, $startColor, $endColor); // override with correct css3 syntax
|
90
|
+
|
91
|
+
// For poor old IE
|
92
|
+
-pie-background: linear-gradient($correct, $startColor, $endColor); // IE 6-7 -- Thank Jason for these polyfills for legacy IE browsers: http://css3pie.com/
|
62
93
|
*behavior: url($PIE_path); // IE 6-7 -- Thank Jason for these polyfills for legacy IE browsers: http://css3pie.com/
|
63
94
|
}
|
64
95
|
|
Binary file
|
@@ -20,6 +20,7 @@ module Groundworkcss
|
|
20
20
|
insert_into_file js_file, "#{detect_js_format[1]} require groundworkcss/all\n", :after => "groundworkcss/libs/modernizr-2.6.2.min\n"
|
21
21
|
else
|
22
22
|
puts 'Cannot locate "application.js" or "application(.js).coffee" manifest file for writing...'
|
23
|
+
puts 'You will need to add the following to your javascript manifest file manually:\n\n//= require groundworkcss/libs/modernizr-2.6.2.min\n//= require groundworkcss/all'
|
23
24
|
end
|
24
25
|
|
25
26
|
if File.exists?(css_file)
|
@@ -31,6 +32,7 @@ module Groundworkcss
|
|
31
32
|
end
|
32
33
|
else
|
33
34
|
puts 'Cannot locate "application.css", "application(.css).scss" or "application(.css).sass" manifest file for writing...'
|
35
|
+
puts 'You will need to add the following to your stylesheet manifest file manually:\n\n@import \'groundwork_settings\';\n@import \'groundworkcss/groundwork\';'
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
@@ -38,6 +40,7 @@ module Groundworkcss
|
|
38
40
|
return ['.js', '//='] if File.exist?('app/assets/javascripts/application.js')
|
39
41
|
return ['.js.coffee', '#='] if File.exist?('app/assets/javascripts/application.js.coffee')
|
40
42
|
return ['.coffee', '#='] if File.exist?('app/assets/javascripts/application.coffee')
|
43
|
+
return ['', '']
|
41
44
|
end
|
42
45
|
|
43
46
|
def detect_css_format
|
@@ -46,6 +49,7 @@ module Groundworkcss
|
|
46
49
|
return ['.css.scss'] if File.exist?('app/assets/stylesheets/application.css.scss')
|
47
50
|
return ['.sass'] if File.exist?('app/assets/stylesheets/application.sass')
|
48
51
|
return ['.scss'] if File.exist?('app/assets/stylesheets/application.scss')
|
52
|
+
return ['']
|
49
53
|
end
|
50
54
|
end
|
51
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groundworkcss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-09-
|
15
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: compass-rails
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- app/views/groundworkdocs/tabs.html.erb
|
224
224
|
- app/views/groundworkdocs/typography.html.erb
|
225
225
|
- app/views/layouts/groundworkdocs.html.erb
|
226
|
+
- groundworkcss-2.0.0.gem
|
226
227
|
- groundworkcss.gemspec
|
227
228
|
- lib/groundworkcss.rb
|
228
229
|
- lib/groundworkcss/engine.rb
|