chriseppstein-compass 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +111 -0
- data/Manifest +31 -5
- data/VERSION +1 -1
- data/compass.gemspec +4 -4
- data/examples/blueprint_plugins/config.rb +9 -0
- data/examples/blueprint_plugins/images/link_icons/doc.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/email.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/external.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/feed.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/im.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/pdf.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/visited.png +0 -0
- data/examples/blueprint_plugins/images/link_icons/xls.png +0 -0
- data/examples/blueprint_plugins/{parts → images}/test-small.jpg +0 -0
- data/examples/blueprint_plugins/{parts → images}/test.jpg +0 -0
- data/examples/blueprint_plugins/{parts → images}/valid.png +0 -0
- data/examples/blueprint_plugins/index.html +22 -9
- data/examples/blueprint_plugins/{parts → plugins}/buttons.html +0 -0
- data/examples/blueprint_plugins/{parts → plugins}/fancy_type.html +1 -1
- data/examples/blueprint_plugins/plugins/link_icons.html +59 -0
- data/examples/blueprint_plugins/plugins/rtl.html +84 -0
- data/examples/blueprint_plugins/src/link_icons.sass +13 -0
- data/examples/blueprint_plugins/src/rtl_screen.sass +13 -0
- data/frameworks/blueprint/stylesheets/blueprint/_print.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +3 -0
- data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +3 -3
- data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +28 -15
- data/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -0
- data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +104 -0
- data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +12 -13
- data/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
- data/frameworks/blueprint/templates/link_icons/manifest.rb +10 -0
- data/lib/compass/commands/generate_grid_background.rb +0 -3
- data/lib/compass/commands/project_base.rb +3 -0
- data/lib/compass/commands/update_project.rb +0 -3
- data/lib/compass/commands/write_configuration.rb +0 -3
- data/lib/compass/configuration.rb +26 -5
- data/lib/compass/installers/rails.rb +7 -6
- data/lib/sass_extensions.rb +24 -0
- metadata +34 -7
@@ -30,16 +30,22 @@
|
|
30
30
|
// A container should group all your columns
|
31
31
|
.container
|
32
32
|
+container
|
33
|
+
.column, #{enumerate("div.span", 1, !blueprint_grid_columns)}
|
34
|
+
+column-base
|
35
|
+
// The last column in a row needs this class (or mixin) or it will end up on the next row.
|
36
|
+
.last, div.last
|
37
|
+
+last
|
33
38
|
// Use these classes (or mixins) to set the width of a column.
|
34
|
-
@for !n from 1 to !blueprint_grid_columns
|
39
|
+
@for !n from 1 to !blueprint_grid_columns
|
35
40
|
.span-#{!n}
|
36
41
|
+span(!n)
|
37
|
-
|
42
|
+
.span-#{!blueprint_grid_columns}, div.span-#{!blueprint_grid_columns}
|
43
|
+
+span(!blueprint_grid_columns)
|
44
|
+
:margin 0
|
45
|
+
input, textarea, select
|
46
|
+
@for !n from 1 through !blueprint_grid_columns
|
38
47
|
&.span-#{!n}
|
39
|
-
+
|
40
|
-
// The last column in a row needs this class (or mixin) or it will end up on the next row.
|
41
|
-
div.last
|
42
|
-
+last
|
48
|
+
+span(!n, true)
|
43
49
|
// Add these to a column to append empty cols.
|
44
50
|
@for !n from 1 to !blueprint_grid_columns
|
45
51
|
.append-#{!n}
|
@@ -50,10 +56,10 @@
|
|
50
56
|
+prepend(!n)
|
51
57
|
// Use these classes on an element to push it into the
|
52
58
|
// next column, or to pull it into the previous column.
|
53
|
-
@for !n from 1
|
59
|
+
@for !n from 1 through !blueprint_grid_columns
|
54
60
|
.pull-#{!n}
|
55
61
|
+pull(!n)
|
56
|
-
@for !n from 1
|
62
|
+
@for !n from 1 through !blueprint_grid_columns
|
57
63
|
.push-#{!n}
|
58
64
|
+push(!n)
|
59
65
|
|
@@ -69,16 +75,17 @@
|
|
69
75
|
// The last column in a row needs this mixin or it will end up on the next row.
|
70
76
|
// TODO add this to span mixin when we have optional arguments
|
71
77
|
=last
|
72
|
-
:margin
|
73
|
-
:right 0
|
78
|
+
:margin-right 0
|
74
79
|
|
75
|
-
=span(!n)
|
76
|
-
|
80
|
+
=span(!n, !override = false)
|
81
|
+
!width = !blueprint_grid_width * !n + (!blueprint_grid_margin * (!n - 1))
|
82
|
+
@if !override
|
83
|
+
:width = !width !important
|
84
|
+
@else
|
85
|
+
:width = !width
|
77
86
|
|
78
|
-
|
79
|
-
=column(!n, !last = false)
|
87
|
+
=column-base(!last = false)
|
80
88
|
+float-left
|
81
|
-
+span(!n)
|
82
89
|
@if !last
|
83
90
|
+last
|
84
91
|
@else
|
@@ -86,6 +93,12 @@
|
|
86
93
|
* html &
|
87
94
|
:overflow-x hidden
|
88
95
|
|
96
|
+
// Use this mixins to set the width of n columns.
|
97
|
+
=column(!n, !last = false)
|
98
|
+
+column-base(!last)
|
99
|
+
+span(!n)
|
100
|
+
|
101
|
+
|
89
102
|
// Mixin to a column to append n empty cols.
|
90
103
|
=append(!n)
|
91
104
|
:padding-right = (!blueprint_grid_outer_width) * !n
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=no-link-icon
|
2
|
+
:background transparent none !important
|
3
|
+
:padding 0 !important
|
4
|
+
:margin 0 !important
|
5
|
+
|
6
|
+
=link-icon-base
|
7
|
+
:padding 2px 22px 2px 0
|
8
|
+
:margin -2px 0
|
9
|
+
:background-repeat no-repeat
|
10
|
+
:background-position right center
|
11
|
+
|
12
|
+
=link-icon(!name, !include_base = true)
|
13
|
+
@if !include_base
|
14
|
+
+link-icon-base
|
15
|
+
:background-image= image_url("link_icons/#{!name}")
|
16
|
+
|
17
|
+
=link-icons
|
18
|
+
a[href^="http:"],
|
19
|
+
a[href^="mailto:"],
|
20
|
+
a[href^="http:"]:visited,
|
21
|
+
a[href$=".pdf"],
|
22
|
+
a[href$=".doc"],
|
23
|
+
a[href$=".xls"],
|
24
|
+
a[href$=".rss"],
|
25
|
+
a[href$=".rdf"],
|
26
|
+
a[href^="aim:"]
|
27
|
+
+link-icon-base
|
28
|
+
a[href^="http:"]
|
29
|
+
+link-icon("external.png", false)
|
30
|
+
a[href^="mailto:"]
|
31
|
+
+link-icon("email.png", false)
|
32
|
+
a[href^="http:"]:visited
|
33
|
+
+link-icon("visited.png", false)
|
34
|
+
a[href$=".pdf"]
|
35
|
+
+link-icon("pdf.png", false)
|
36
|
+
a[href$=".doc"]
|
37
|
+
+link-icon("doc.png", false)
|
38
|
+
a[href$=".xls"]
|
39
|
+
+link-icon("xls.png", false)
|
40
|
+
a[href$=".rss"],
|
41
|
+
a[href$=".rdf"]
|
42
|
+
+link-icon("feed.png", false)
|
43
|
+
a[href^="aim:"]
|
44
|
+
+link-icon("im.png", false)
|
@@ -0,0 +1,104 @@
|
|
1
|
+
@import grid.sass
|
2
|
+
@import compass/utilities/general/float.sass
|
3
|
+
|
4
|
+
// Main layout grid, override these constants to build your grid and container sizes.
|
5
|
+
!blueprint_grid_columns ||= 24
|
6
|
+
!blueprint_grid_width ||= 30px
|
7
|
+
!blueprint_grid_margin ||= 10px
|
8
|
+
|
9
|
+
!blueprint_grid_outer_width = !blueprint_grid_width + !blueprint_grid_margin
|
10
|
+
!blueprint_container_size = !blueprint_grid_outer_width * !blueprint_grid_columns - !blueprint_grid_margin
|
11
|
+
|
12
|
+
// Columns
|
13
|
+
// Note: If you use this mixin without the class and want to support ie6
|
14
|
+
// you must set text-align left on your container element in an IE stylesheet.
|
15
|
+
=container
|
16
|
+
:width = !blueprint_container_size
|
17
|
+
:margin 0 auto
|
18
|
+
:direction rtl
|
19
|
+
+clearfix
|
20
|
+
|
21
|
+
// The last column in a row needs this mixin or it will end up on the next row.
|
22
|
+
// TODO add this to span mixin when we have optional arguments
|
23
|
+
=last
|
24
|
+
:margin-left 0
|
25
|
+
|
26
|
+
=column-base(!last = false)
|
27
|
+
+float-right
|
28
|
+
@if !last
|
29
|
+
+last
|
30
|
+
@else
|
31
|
+
:margin-left = !blueprint_grid_margin
|
32
|
+
* html &
|
33
|
+
:overflow-x hidden
|
34
|
+
|
35
|
+
// Mixin to a column to append n empty cols.
|
36
|
+
=append(!n)
|
37
|
+
:padding-left = (!blueprint_grid_outer_width) * !n
|
38
|
+
|
39
|
+
// Mixin to a column to prepend n empty cols.
|
40
|
+
=prepend(!n)
|
41
|
+
:padding-right = (!blueprint_grid_outer_width) * !n
|
42
|
+
|
43
|
+
// mixin to a column to move it n columns to the left
|
44
|
+
=pull(!n, !last = false)
|
45
|
+
:position relative
|
46
|
+
@if !last
|
47
|
+
:margin-right = (-!blueprint_grid_outer_width * !n) + !blueprint_grid_margin
|
48
|
+
@else
|
49
|
+
:margin-right = -!blueprint_grid_outer_width * !n
|
50
|
+
|
51
|
+
// mixin to a column to push it n columns to the right
|
52
|
+
=push(!n)
|
53
|
+
+float-right
|
54
|
+
:position relative
|
55
|
+
:margin
|
56
|
+
:top 0
|
57
|
+
:left = -!blueprint_grid_outer_width * !n
|
58
|
+
:bottom 1.5em
|
59
|
+
:right = !blueprint_grid_outer_width * !n
|
60
|
+
|
61
|
+
// Border on left hand side of a column.
|
62
|
+
=border
|
63
|
+
:padding-left = !blueprint_grid_margin / 2 - 1
|
64
|
+
:margin-left = !blueprint_grid_margin / 2
|
65
|
+
:border-left 1px solid #eee
|
66
|
+
|
67
|
+
// Border with more whitespace, spans one column.
|
68
|
+
=colborder
|
69
|
+
:padding-left= !blueprint_grid_width - 0.5 * !blueprint_grid_margin - 1
|
70
|
+
:margin-left= !blueprint_grid_width - 0.5 * !blueprint_grid_margin
|
71
|
+
:border-left 1px solid #eee
|
72
|
+
|
73
|
+
=rtl-typography(!body_selector = "body")
|
74
|
+
html #{!body_selector}
|
75
|
+
:font-family Arial, sans-serif
|
76
|
+
@if !body_selector != "body"
|
77
|
+
+rtl-typography-defaults
|
78
|
+
@if !body_selector == "body"
|
79
|
+
body
|
80
|
+
+rtl-typography-defaults
|
81
|
+
|
82
|
+
=rtl-typography-defaults
|
83
|
+
h1, h2, h3, h4, h5, h6
|
84
|
+
:font-family Arial, sans-serif
|
85
|
+
|
86
|
+
pre, code, tt
|
87
|
+
:font-family monospace
|
88
|
+
|
89
|
+
p
|
90
|
+
img.right
|
91
|
+
+float-left
|
92
|
+
:margin 1.5em 1.5em 1.5em 0
|
93
|
+
:padding 0
|
94
|
+
img.left
|
95
|
+
+float-right
|
96
|
+
:margin 1.5em 0 1.5em 1.5em
|
97
|
+
:padding 0
|
98
|
+
|
99
|
+
dd, ul, ol
|
100
|
+
:margin-left 0
|
101
|
+
:margin-right 1.5em
|
102
|
+
|
103
|
+
td, th
|
104
|
+
:text-align right
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@import compass/utilities/links/link_colors.sass
|
3
3
|
@import compass/utilities/general/float.sass
|
4
4
|
|
5
|
-
!blueprint_font_family ||= "Helvetica Neue,
|
5
|
+
!blueprint_font_family ||= "Helvetica Neue, Arial, Helvetica, sans-serif"
|
6
6
|
!blueprint_fixed_font_family ||= "'andale mono', 'lucida console', monospace"
|
7
7
|
|
8
8
|
// The +blueprint-typography mixin must be mixed into the top level of your stylesheet.
|
@@ -70,7 +70,6 @@
|
|
70
70
|
:font-size 1.2em
|
71
71
|
:line-height 1.25
|
72
72
|
:margin-bottom 1.25em
|
73
|
-
:height 1.25em
|
74
73
|
h5
|
75
74
|
+header-text
|
76
75
|
:font-size 1em
|
@@ -84,13 +83,14 @@
|
|
84
83
|
:margin 0
|
85
84
|
p
|
86
85
|
:margin 0 0 1.5em
|
87
|
-
img
|
86
|
+
img.left
|
88
87
|
+float-left
|
89
88
|
:margin 1.5em 1.5em 1.5em 0
|
90
89
|
:padding 0
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
img.right
|
91
|
+
+float-right
|
92
|
+
:margin 1.5em 0 1.5em 1.5em
|
93
|
+
:padding 0
|
94
94
|
a
|
95
95
|
:text-decoration underline
|
96
96
|
+link-colors(!link_color, !link_hover_color, !link_active_color, !link_visited_color, !link_focus_color)
|
@@ -114,11 +114,10 @@
|
|
114
114
|
:font-style italic
|
115
115
|
del
|
116
116
|
:color #666
|
117
|
-
pre
|
117
|
+
pre
|
118
118
|
:margin 1.5em 0
|
119
119
|
:white-space pre
|
120
|
-
|
121
|
-
tt
|
120
|
+
pre, code, tt
|
122
121
|
+fixed-width-text
|
123
122
|
li ul, li ol
|
124
123
|
:margin 0 1.5em
|
@@ -139,12 +138,12 @@
|
|
139
138
|
:width 100%
|
140
139
|
th
|
141
140
|
:font-weight bold
|
142
|
-
|
143
|
-
:
|
144
|
-
td
|
141
|
+
thead th
|
142
|
+
:background= !blueprint_table_header_color
|
143
|
+
th, td, caption
|
145
144
|
:padding 4px 10px 4px 5px
|
146
145
|
tr.even td
|
147
|
-
:background
|
146
|
+
:background= !blueprint_table_stripe_color
|
148
147
|
tfoot
|
149
148
|
:font-style italic
|
150
149
|
caption
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@import blueprint/modules/link_icons.sass
|
2
|
+
|
3
|
+
// This turns link icons on for all links. You can change the scoping selector from
|
4
|
+
// body to something more specific if you prefer.
|
5
|
+
body
|
6
|
+
+link-icons
|
7
|
+
// Use this class if a link gets an icon when it shouldn't.
|
8
|
+
a.noicon
|
9
|
+
+no-link-icon
|
10
|
+
// Not all links have a url structure that can be detected,
|
11
|
+
// So you can set them explicitly yourself like so:
|
12
|
+
a#this-is-a-pdf-link
|
13
|
+
+link-icon("pdf.png")
|
@@ -0,0 +1,10 @@
|
|
1
|
+
stylesheet "link_icons.sass", :media => 'screen, projection'
|
2
|
+
|
3
|
+
image 'link_icons/doc.png'
|
4
|
+
image 'link_icons/email.png'
|
5
|
+
image 'link_icons/external.png'
|
6
|
+
image 'link_icons/feed.png'
|
7
|
+
image 'link_icons/im.png'
|
8
|
+
image 'link_icons/pdf.png'
|
9
|
+
image 'link_icons/visited.png'
|
10
|
+
image 'link_icons/xls.png'
|
@@ -12,9 +12,6 @@ module Compass
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def perform
|
15
|
-
read_project_configuration
|
16
|
-
Compass.configuration.set_maybe(options)
|
17
|
-
Compass.configuration.set_defaults!
|
18
15
|
column_width, gutter_width = options[:grid_dimensions].split(/\+/).map{|d| d.to_i}
|
19
16
|
unless GridBuilder.new(options.merge(:column_width => column_width, :gutter_width => gutter_width, :output_path => projectize(project_images_subdirectory), :working_path => self.working_path)).generate!
|
20
17
|
puts "ERROR: Some library dependencies appear to be missing."
|
@@ -13,6 +13,9 @@ module Compass
|
|
13
13
|
super(working_path, options)
|
14
14
|
self.project_name = determine_project_name(working_path, options)
|
15
15
|
Compass.configuration.project_path = determine_project_directory(working_path, options)
|
16
|
+
read_project_configuration
|
17
|
+
Compass.configuration.set_maybe(options)
|
18
|
+
Compass.configuration.set_defaults!
|
16
19
|
end
|
17
20
|
|
18
21
|
protected
|
@@ -11,9 +11,6 @@ module Compass
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def perform
|
14
|
-
read_project_configuration
|
15
|
-
Compass.configuration.set_maybe(options)
|
16
|
-
Compass.configuration.set_defaults!
|
17
14
|
Compass::Compiler.new(working_path,
|
18
15
|
projectize(Compass.configuration.sass_dir),
|
19
16
|
projectize(Compass.configuration.css_dir),
|
@@ -5,13 +5,15 @@ module Compass
|
|
5
5
|
include Singleton
|
6
6
|
|
7
7
|
ATTRIBUTES = [
|
8
|
+
:project_type,
|
8
9
|
:project_path,
|
9
10
|
:css_dir,
|
10
11
|
:sass_dir,
|
11
12
|
:images_dir,
|
12
13
|
:javascripts_dir,
|
13
14
|
:output_style,
|
14
|
-
:environment
|
15
|
+
:environment,
|
16
|
+
:http_images_path
|
15
17
|
]
|
16
18
|
|
17
19
|
attr_accessor *ATTRIBUTES
|
@@ -52,12 +54,18 @@ module Compass
|
|
52
54
|
|
53
55
|
def default_all(options)
|
54
56
|
ATTRIBUTES.each do |a|
|
55
|
-
|
57
|
+
set_default_unless_set(a, options[a])
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|
61
|
+
def set_default_unless_set(attribute, value)
|
62
|
+
self.send("#{attribute}=", value) unless self.send(attribute)
|
63
|
+
end
|
64
|
+
|
59
65
|
def set_defaults!
|
60
|
-
|
66
|
+
ATTRIBUTES.each do |a|
|
67
|
+
set_default_unless_set(a, default_for(a))
|
68
|
+
end
|
61
69
|
end
|
62
70
|
|
63
71
|
def default_for(attribute)
|
@@ -77,6 +85,14 @@ module Compass
|
|
77
85
|
"images"
|
78
86
|
end
|
79
87
|
|
88
|
+
def default_http_images_path
|
89
|
+
"/#{images_dir}"
|
90
|
+
end
|
91
|
+
|
92
|
+
def comment_for_http_images_path
|
93
|
+
"# To enable relative image paths using the images_url() function:\n# http_images_path = :relative\n"
|
94
|
+
end
|
95
|
+
|
80
96
|
def default_output_style
|
81
97
|
if environment == :development
|
82
98
|
:expanded
|
@@ -98,8 +114,13 @@ module Compass
|
|
98
114
|
contents << "\n" if required_libraries.any?
|
99
115
|
ATTRIBUTES.each do |prop|
|
100
116
|
value = send(prop)
|
101
|
-
|
102
|
-
contents <<
|
117
|
+
if respond_to?("comment_for_#{prop}")
|
118
|
+
contents << send("comment_for_#{prop}")
|
119
|
+
end
|
120
|
+
if block_given? && (to_emit = yield(prop, value))
|
121
|
+
contents << to_emit
|
122
|
+
else
|
123
|
+
contents << %Q(#{prop} = #{value.inspect}\n) unless value.nil?
|
103
124
|
end
|
104
125
|
end
|
105
126
|
contents
|
@@ -4,7 +4,7 @@ module Compass
|
|
4
4
|
class RailsInstaller < Base
|
5
5
|
|
6
6
|
def configure
|
7
|
-
configuration_file = targetize('config/
|
7
|
+
configuration_file = targetize('config/compass.config')
|
8
8
|
if File.exists?(configuration_file)
|
9
9
|
open(configuration_file) do |config|
|
10
10
|
eval(config.read, nil, configuration_file)
|
@@ -20,6 +20,11 @@ module Compass
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def prepare
|
23
|
+
write_file(targetize('config/compass.config'), Compass.configuration.serialize do |prop, value|
|
24
|
+
if prop == :project_path
|
25
|
+
"project_path = RAILS_ROOT if defined?(RAILS_ROOT)\n"
|
26
|
+
end
|
27
|
+
end)
|
23
28
|
write_file targetize('config/initializers/compass.rb'), initializer_contents
|
24
29
|
end
|
25
30
|
|
@@ -81,11 +86,7 @@ Emit compiled stylesheets to #{recommended_location}/? (Y/n) }
|
|
81
86
|
def initializer_contents
|
82
87
|
%Q{require 'compass'
|
83
88
|
# If you have any compass plugins, require them here.
|
84
|
-
Compass.configuration
|
85
|
-
config.project_path = RAILS_ROOT
|
86
|
-
config.sass_dir = "#{sass_dir}"
|
87
|
-
config.css_dir = "#{css_dir}"
|
88
|
-
end
|
89
|
+
Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
|
89
90
|
Compass.configure_sass_plugin!
|
90
91
|
}
|
91
92
|
end
|
data/lib/sass_extensions.rb
CHANGED
@@ -2,6 +2,7 @@ require 'sass'
|
|
2
2
|
|
3
3
|
module Sass::Script::Functions
|
4
4
|
COMMA_SEPARATOR = /\s*,\s*/
|
5
|
+
|
5
6
|
def nest(*arguments)
|
6
7
|
nested = arguments.map{|a| a.value}.inject do |memo,arg|
|
7
8
|
ancestors = memo.split(COMMA_SEPARATOR)
|
@@ -10,4 +11,27 @@ module Sass::Script::Functions
|
|
10
11
|
end
|
11
12
|
Sass::Script::String.new(nested)
|
12
13
|
end
|
14
|
+
|
15
|
+
def enumerate(prefix, from, through)
|
16
|
+
selectors = (from.value..through.value).map{|i| "#{prefix.value}-#{i}"}.join(", ")
|
17
|
+
Sass::Script::String.new(selectors)
|
18
|
+
end
|
19
|
+
|
20
|
+
def image_url(path)
|
21
|
+
http_images_path = if Compass.configuration.http_images_path == :relative
|
22
|
+
if (target_css_file = options[:css_filename])
|
23
|
+
images_path = File.join(Compass.configuration.project_path, Compass.configuration.images_dir)
|
24
|
+
Pathname.new(images_path).relative_path_from(Pathname.new(File.dirname(target_css_file))).to_s
|
25
|
+
else
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
else
|
29
|
+
Compass.configuration.http_images_path
|
30
|
+
end
|
31
|
+
if http_images_path
|
32
|
+
http_images_path = "#{http_images_path}/" unless http_images_path[-1..-1] == "/"
|
33
|
+
path = "#{http_images_path}#{path}"
|
34
|
+
end
|
35
|
+
Sass::Script::String.new("url(#{path})")
|
36
|
+
end
|
13
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chriseppstein-compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Eppstein
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-06 00:00:00 -07:00
|
13
13
|
default_executable: compass
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,6 +40,7 @@ extensions: []
|
|
40
40
|
|
41
41
|
extra_rdoc_files:
|
42
42
|
- bin/compass
|
43
|
+
- CHANGELOG.markdown
|
43
44
|
- lib/compass/actions.rb
|
44
45
|
- lib/compass/commands/base.rb
|
45
46
|
- lib/compass/commands/create_project.rb
|
@@ -82,6 +83,7 @@ extra_rdoc_files:
|
|
82
83
|
- README.markdown
|
83
84
|
files:
|
84
85
|
- bin/compass
|
86
|
+
- CHANGELOG.markdown
|
85
87
|
- compass.gemspec
|
86
88
|
- examples/blueprint_default/index.html
|
87
89
|
- examples/blueprint_default/parts/elements.html
|
@@ -94,19 +96,32 @@ files:
|
|
94
96
|
- examples/blueprint_default/src/images/grid.png
|
95
97
|
- examples/blueprint_default/src/print.sass
|
96
98
|
- examples/blueprint_default/src/screen.sass
|
99
|
+
- examples/blueprint_plugins/config.rb
|
97
100
|
- examples/blueprint_plugins/images/buttons/cross.png
|
98
101
|
- examples/blueprint_plugins/images/buttons/key.png
|
99
102
|
- examples/blueprint_plugins/images/buttons/tick.png
|
103
|
+
- examples/blueprint_plugins/images/link_icons/doc.png
|
104
|
+
- examples/blueprint_plugins/images/link_icons/email.png
|
105
|
+
- examples/blueprint_plugins/images/link_icons/external.png
|
106
|
+
- examples/blueprint_plugins/images/link_icons/feed.png
|
107
|
+
- examples/blueprint_plugins/images/link_icons/im.png
|
108
|
+
- examples/blueprint_plugins/images/link_icons/pdf.png
|
109
|
+
- examples/blueprint_plugins/images/link_icons/visited.png
|
110
|
+
- examples/blueprint_plugins/images/link_icons/xls.png
|
111
|
+
- examples/blueprint_plugins/images/test-small.jpg
|
112
|
+
- examples/blueprint_plugins/images/test.jpg
|
113
|
+
- examples/blueprint_plugins/images/valid.png
|
100
114
|
- examples/blueprint_plugins/index.html
|
101
|
-
- examples/blueprint_plugins/
|
102
|
-
- examples/blueprint_plugins/
|
103
|
-
- examples/blueprint_plugins/
|
104
|
-
- examples/blueprint_plugins/
|
105
|
-
- examples/blueprint_plugins/parts/valid.png
|
115
|
+
- examples/blueprint_plugins/plugins/buttons.html
|
116
|
+
- examples/blueprint_plugins/plugins/fancy_type.html
|
117
|
+
- examples/blueprint_plugins/plugins/link_icons.html
|
118
|
+
- examples/blueprint_plugins/plugins/rtl.html
|
106
119
|
- examples/blueprint_plugins/src/buttons.sass
|
107
120
|
- examples/blueprint_plugins/src/ie.sass
|
108
121
|
- examples/blueprint_plugins/src/images/grid.png
|
122
|
+
- examples/blueprint_plugins/src/link_icons.sass
|
109
123
|
- examples/blueprint_plugins/src/print.sass
|
124
|
+
- examples/blueprint_plugins/src/rtl_screen.sass
|
110
125
|
- examples/blueprint_plugins/src/screen.sass
|
111
126
|
- examples/blueprint_scoped/src/ie.sass
|
112
127
|
- examples/blueprint_scoped/src/print.sass
|
@@ -154,7 +169,9 @@ files:
|
|
154
169
|
- frameworks/blueprint/stylesheets/blueprint/modules/_form.sass
|
155
170
|
- frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass
|
156
171
|
- frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass
|
172
|
+
- frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass
|
157
173
|
- frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass
|
174
|
+
- frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass
|
158
175
|
- frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass
|
159
176
|
- frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass
|
160
177
|
- frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass
|
@@ -163,6 +180,16 @@ files:
|
|
163
180
|
- frameworks/blueprint/templates/buttons/buttons/tick.png
|
164
181
|
- frameworks/blueprint/templates/buttons/buttons.sass
|
165
182
|
- frameworks/blueprint/templates/buttons/manifest.rb
|
183
|
+
- frameworks/blueprint/templates/link_icons/link_icons/doc.png
|
184
|
+
- frameworks/blueprint/templates/link_icons/link_icons/email.png
|
185
|
+
- frameworks/blueprint/templates/link_icons/link_icons/external.png
|
186
|
+
- frameworks/blueprint/templates/link_icons/link_icons/feed.png
|
187
|
+
- frameworks/blueprint/templates/link_icons/link_icons/im.png
|
188
|
+
- frameworks/blueprint/templates/link_icons/link_icons/pdf.png
|
189
|
+
- frameworks/blueprint/templates/link_icons/link_icons/visited.png
|
190
|
+
- frameworks/blueprint/templates/link_icons/link_icons/xls.png
|
191
|
+
- frameworks/blueprint/templates/link_icons/link_icons.sass
|
192
|
+
- frameworks/blueprint/templates/link_icons/manifest.rb
|
166
193
|
- frameworks/blueprint/templates/project/grid.png
|
167
194
|
- frameworks/blueprint/templates/project/ie.sass
|
168
195
|
- frameworks/blueprint/templates/project/manifest.rb
|