Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

q

  • Loading branch information...
commit 2501bf1e872ff7716006a3105adfe3c47bdf13d0 1 parent 2e4e472
Pedro Teixeira authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/styled_objects/generator.rb
9 lib/styled_objects/generator.rb
View
@@ -6,10 +6,17 @@ def self.generate(view_paths, uri)
file_path = self._find_partial_stylesheet(view_paths, "#{path}.css")
if file_path
File.open(file_path) do |file|
- ".#{StyledObjects::ClassNameBuilder.build_class_name_from_partial_path(path)}{#{file.read}}"
+ ".#{StyledObjects::ClassNameBuilder.build_class_name_from_partial_path(path)}{\n#{file.read}\n}\n"
end
end
end.compact.join("\n")
+ file_path = self._find_partial_stylesheet(view_paths, "/globals.css")
+ if file_path
+ File.open(file_path) do |file|
+ content = "#{file.read}\n#{content}"
+ end
+ end
+
::Less::Engine.new(content).to_css
end
Please sign in to comment.
Something went wrong with that request. Please try again.