Sha256: 5cb236036bd4d5cf814ea2b8151fefb47355558cbee4f88933fd7304003c56f0

Contents?: true

Size: 574 Bytes

Versions: 47

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true
# LESS support is deprecated since it requires therubyracer.gem,
# which is hard to maintain.
#
# It's not supported in Sprockets 3.0+ too.
# https://github.com/sstephenson/sprockets/pull/547
module Haml
  class Filters
    class Less < TiltBase
      def compile(node)
        require 'tilt/less' if explicit_require?('less')
        temple = [:multi]
        temple << [:static, "<style>\n"]
        temple << compile_with_tilt(node, 'less', indent_width: 2)
        temple << [:static, '</style>']
        temple
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
haml-6.3.0 lib/haml/filters/less.rb
haml-6.2.5 lib/haml/filters/less.rb
haml-6.2.4 lib/haml/filters/less.rb
haml-6.2.3 lib/haml/filters/less.rb
haml-6.2.2 lib/haml/filters/less.rb
haml-6.2.1 lib/haml/filters/less.rb
haml-6.2.0 lib/haml/filters/less.rb
haml-6.1.4-java lib/haml/filters/less.rb
haml-6.1.4 lib/haml/filters/less.rb
haml-6.1.3-java lib/haml/filters/less.rb
haml-6.1.3 lib/haml/filters/less.rb
haml-6.1.2-java lib/haml/filters/less.rb
haml-6.1.2 lib/haml/filters/less.rb
haml-6.1.1-java lib/haml/filters/less.rb
haml-6.1.1 lib/haml/filters/less.rb
haml-6.1.0-java lib/haml/filters/less.rb
haml-6.1.0 lib/haml/filters/less.rb
haml-6.0.12-java lib/haml/filters/less.rb
haml-6.0.12 lib/haml/filters/less.rb
haml-6.0.11-java lib/haml/filters/less.rb