aliddle-sass 3.2.10 → 3.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sass/exec.rb +4 -0
- data/lib/sass/tree/visitors/to_css.rb +9 -4
- metadata +4 -4
data/lib/sass/exec.rb
CHANGED
@@ -258,6 +258,10 @@ END
|
|
258
258
|
'Output style. Can be nested (default), compact, compressed, or expanded.') do |name|
|
259
259
|
@options[:for_engine][:style] = name.to_sym
|
260
260
|
end
|
261
|
+
opts.on('--singlespace', '--singlespace BOOL',
|
262
|
+
'Output can remove all blank lines, or leave them as SASS defaults.') do |linebreak|
|
263
|
+
@options[:for_engine][:singlespace] = linebreak
|
264
|
+
end
|
261
265
|
opts.on('--precision NUMBER_OF_DIGITS', Integer,
|
262
266
|
'How many digits of precision to use when outputting decimal numbers. Defaults to 3.') do |precision|
|
263
267
|
::Sass::Script::Number.precision = precision
|
@@ -53,7 +53,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
53
53
|
|
54
54
|
def visit_charset(node)
|
55
55
|
"@charset \"#{node.name}\";"
|
56
|
-
end
|
56
|
+
end
|
57
57
|
|
58
58
|
def visit_comment(node)
|
59
59
|
return if node.invisible?
|
@@ -127,7 +127,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
127
127
|
if node.style == :compressed
|
128
128
|
"#{tab_str}#{node.resolved_name}:#{node.resolved_value}"
|
129
129
|
elsif node.style == :compact
|
130
|
-
"#{tab_str}#{node.resolved_name}:#node.resolved_value}"
|
130
|
+
"#{tab_str}#{node.resolved_name}:#{node.resolved_value}"
|
131
131
|
else
|
132
132
|
"#{tab_str}#{node.resolved_name}: #{node.resolved_value};"
|
133
133
|
end
|
@@ -189,16 +189,21 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
192
|
+
line_break = "\n"
|
193
|
+
if node.options[:singlespace] == 'true'
|
194
|
+
line_break = ''
|
195
|
+
end
|
196
|
+
|
192
197
|
if node.style == :compact
|
193
198
|
properties = with_tabs(0) {node.children.map {|a| visit(a)}.join(' ')}
|
194
|
-
to_return << "#{total_rule} { #{properties} }#{
|
199
|
+
to_return << "#{total_rule} { #{properties} }#{line_break if node.group_end}"
|
195
200
|
elsif node.style == :compressed
|
196
201
|
properties = with_tabs(0) {node.children.map {|a| visit(a)}.join(';')}
|
197
202
|
to_return << "#{total_rule}{#{properties}}"
|
198
203
|
else
|
199
204
|
properties = with_tabs(@tabs + 1) {node.children.map {|a| visit(a)}.join("\n")}
|
200
205
|
end_props = (node.style == :expanded ? "\n" + old_spaces : ' ')
|
201
|
-
to_return << "#{total_rule} {\n#{properties}#{end_props}}#{
|
206
|
+
to_return << "#{total_rule} {\n#{properties}#{end_props}}#{line_break if node.group_end}"
|
202
207
|
end
|
203
208
|
|
204
209
|
to_return
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 3.2.
|
8
|
+
- 11
|
9
|
+
version: 3.2.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nathan Weizenbaum
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-09-
|
19
|
+
date: 2013-09-30 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: 0.5.9
|
48
48
|
type: :development
|
49
49
|
version_requirements: *id002
|
50
|
-
description: " Sass makes CSS fun again. Sass is an extension of CSS3, adding\n nested rules, variables, mixins, selector inheritance, and more.\n It's translated to well-formatted, standard CSS using the\n command line tool or a web-framework plugin.\n"
|
50
|
+
description: " A slightly customized version of SASS. To get the official \n SASS release, please run ==> gem install sass. Based on v.3.2.10\n Sass makes CSS fun again. Sass is an extension of CSS3, adding\n nested rules, variables, mixins, selector inheritance, and more.\n It's translated to well-formatted, standard CSS using the\n command line tool or a web-framework plugin.\n"
|
51
51
|
email: sass-lang@googlegroups.com
|
52
52
|
executables:
|
53
53
|
- sass
|