Sha256: da47d886000a8375405733f5d077a6b4eade0e48ed1fd9f60373f818510a69c0

Contents?: true

Size: 773 Bytes

Versions: 33

Compression:

Stored size: 773 Bytes

Contents

module Sass::Tree
  # A static node representing an unproccessed Sass `@charset` directive.
  #
  # @see Sass::Tree
  class CharsetNode < Node
    # The name of the charset.
    #
    # @return [String]
    attr_accessor :name

    # @param name [String] see \{#name}
    def initialize(name)
      @name = name
      super()
    end

    # @see Node#invisible?
    def invisible?
      !Sass::Util.ruby1_8?
    end

    protected

    # @see Node#to_src
    def to_src(tabs, opts, fmt)
      "#{'  ' * tabs}@charset \"#{name}\"#{semi fmt}\n"
    end

    # Computes the CSS for the directive.
    #
    # @param tabs [Fixnum] The level of indentation for the CSS
    # @return [String] The resulting CSS
    def _to_s(tabs)
      "@charset \"#{name}\";"
    end
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
haml-3.1.0 vendor/sass/lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.147 vendor/sass/lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.145 vendor/sass/lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.144 vendor/sass/lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.141 vendor/sass/lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.37 vendor/sass/lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.48 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.47 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.46 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.45 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.44 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.43 lib/sass/tree/charset_node.rb
haml-3.1.0.alpha.36 vendor/sass/lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.42 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.41 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.40 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.39 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.38 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.37 lib/sass/tree/charset_node.rb
sass-3.1.0.alpha.36 lib/sass/tree/charset_node.rb