Sha256: 65f2f60561f8141237225167079168054646a803cd016584149220f0cab82a0b

Contents?: true

Size: 670 Bytes

Versions: 15

Compression:

Stored size: 670 Bytes

Contents

include_set Abstract::Css

format :css do
  view :compiled do
    compile_scss _render_core
  end

  view :core do
    process_content(_render_raw)
  end

  def compile_scss scss, style=:expanded
    # return scss if Rails.env.development?
    SassC::Engine.new(scss, style: style).render
  rescue SassC::SyntaxError => e
    raise Card::Error,
          "SassC::SyntaxError (#{card.name}:#{e.sass_backtrace}): #{e.message}"
    # "#{#scss.lines[e.sass_line - 1]}\n" \
  end
end

format :scss do
  view :labeled do
    "//#{card.name}\n#{_render_core}"
  end

  view :core do
    process_content _render_raw
  end
end

format :html do
  def ace_mode
    :scss
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
card-mod-style-0.18.1 set/abstract/02_scss.rb
card-mod-style-0.18.0 set/abstract/02_scss.rb
card-mod-style-0.17.0 set/abstract/02_scss.rb
card-mod-style-0.16.0 set/abstract/02_scss.rb
card-mod-style-0.15.6 set/abstract/02_scss.rb
card-mod-style-0.15.5 set/abstract/02_scss.rb
card-mod-style-0.15.4 set/abstract/02_scss.rb
card-mod-style-0.15.3 set/abstract/02_scss.rb
card-mod-style-0.15.2.pre1 set/abstract/02_scss.rb
card-mod-style-0.15.1.1 set/abstract/02_scss.rb
card-mod-style-0.15.1 set/abstract/02_scss.rb
card-mod-style-0.15.0 set/abstract/02_scss.rb
card-mod-style-0.14.2 set/abstract/02_scss.rb
card-mod-style-0.14.1 set/abstract/02_scss.rb
card-mod-style-0.14.0 set/abstract/02_scss.rb