Authored by 毕凯

compass 增加 autoprefixer 配置

require 'compass/import-once/activate'
# autoprefixer自动加浏览器前缀
# 需要先安装, gem install autoprefixer-rails
# require 'autoprefixer-rails'
#
# on_stylesheet_saved do |file|
# css = File.read(file)
# map = file + '.map'
# browsers = ['> 1%', 'ie 8']
#
# if File.exists? map
# result = AutoprefixerRails.process(css,
# from: file,
# to: file,
# browsers: browsers,
# map: { prev: File.read(map), inline: false })
# File.open(file, 'w') { |io| io << result.css }
# File.open(map, 'w') { |io| io << result.map }
# else
# File.open(file, 'w') { |io| io << AutoprefixerRails.process(css, browsers) }
# end
# end
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
... ... @@ -25,4 +49,4 @@ line_comments = false
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
Encoding.default_external = "utf-8"
\ No newline at end of file
Encoding.default_external = "utf-8"
... ...