Class Sass::Tree::Visitors::ToCss
In: lib/sass/tree/visitors/to_css.rb
Parent: Sass::Tree::Visitors::Base

A visitor for converting a Sass tree into CSS.

Methods

Constants

NEWLINE = "\n"   Avoid allocating lots of new strings for `output`. This is important because `output` is called all the time.

Attributes

source_mapping  [R]  The source mapping for the generated CSS file. This is only set if `build_source_mapping` is passed to the constructor and \{Sass::Engine#render} has been run.

Public Class methods

@param build_source_mapping [Boolean] Whether to build a

  \{Sass::Source::Map} while creating the CSS output. The mapping will
  be available from \{#source\_mapping} after the visitor has completed.

Public Instance methods

Runs the visitor on `node`.

@param node [Sass::Tree::Node] The root node of the tree to convert to CSS> @return [String] The CSS output.

Protected Instance methods

Move the output cursor back `chars` characters.

Associate all output produced in a block with a given node. Used for source mapping.

lstrip the first output in the given block.

Add `s` to the output string and update the line and offset information accordingly.

Prepend `prefix` to the output string.

Strip all trailing whitespace from the output string.

@comment

  rubocop:disable MethodLength

@comment

  rubocop:enable MethodLength

@comment

  rubocop:enable MethodLength

@comment

  rubocop:disable MethodLength

[Validate]