Module Sass
In: lib/sass/tree/return_node.rb
lib/sass/tree/warn_node.rb
lib/sass/tree/content_node.rb
lib/sass/tree/debug_node.rb
lib/sass/tree/error_node.rb
lib/sass/tree/root_node.rb
lib/sass/tree/at_root_node.rb
lib/sass/tree/function_node.rb
lib/sass/tree/variable_node.rb
lib/sass/tree/node.rb
lib/sass/tree/mixin_def_node.rb
lib/sass/tree/import_node.rb
lib/sass/util/subset_map.rb
lib/sass/util/test.rb
lib/sass/util/cross_platform_random.rb
lib/sass/util/normalized_map.rb
lib/sass/importers/base.rb
lib/sass/importers/filesystem.rb
lib/sass/importers/deprecated_path.rb
lib/sass/repl.rb
lib/sass/cache_stores.rb
lib/sass/root.rb
lib/sass/selector/pseudo.rb
lib/sass/selector/simple_sequence.rb
lib/sass/selector/sequence.rb
lib/sass/selector/abstract_sequence.rb
lib/sass/selector/comma_sequence.rb
lib/sass/selector/simple.rb
lib/sass/plugin/staleness_checker.rb
lib/sass/plugin/configuration.rb
lib/sass/plugin/rack.rb
lib/sass/util.rb
lib/sass/script.rb
lib/sass/engine.rb
lib/sass/cache_stores/chain.rb
lib/sass/cache_stores/memory.rb
lib/sass/cache_stores/base.rb
lib/sass/cache_stores/filesystem.rb
lib/sass/cache_stores/null.rb
lib/sass/shared.rb
lib/sass/scss/parser.rb
lib/sass/scss/static_parser.rb
lib/sass/scss/rx.rb
lib/sass/scss/css_parser.rb
lib/sass/importers.rb
lib/sass/exec.rb
lib/sass/logger.rb
lib/sass/plugin.rb
lib/sass/scss.rb
lib/sass/stack.rb
lib/sass/error.rb
lib/sass/logger/log_level.rb
lib/sass/css.rb
lib/sass/script/parser.rb
lib/sass/script/css_variable_warning.rb
lib/sass/script/css_lexer.rb
lib/sass/script/css_parser.rb
lib/sass/script/lexer.rb
lib/sass/environment.rb
lib/sass/callbacks.rb
lib/sass/selector.rb
lib/sass/features.rb
lib/sass/version.rb
lib/sass.rb

The module that contains everything Sass-related:

Also see the {file:SASS_REFERENCE.md full Sass reference}.

Methods

Classes and Modules

Module Sass::CacheStores
Module Sass::Callbacks
Module Sass::Exec
Module Sass::Features
Module Sass::Importers
Module Sass::Logger
Module Sass::Media
Module Sass::Plugin
Module Sass::SCSS
Module Sass::Script
Module Sass::Selector
Module Sass::Shared
Module Sass::Source
Module Sass::Supports
Module Sass::Tree
Module Sass::Util
Module Sass::Version
Class Sass::BaseEnvironment
Class Sass::CSS
Class Sass::Engine
Class Sass::Environment
Class Sass::ReadOnlyEnvironment
Class Sass::Repl
Class Sass::SemiGlobalEnvironment
Class Sass::Stack
Class Sass::StaticConditionalContext
Class Sass::SyntaxError
Class Sass::UnitConversionError

Constants

ROOT_DIR = File.expand_path(File.join(__FILE__, "../../.."))   The root directory of the Sass source tree. This may be overridden by the package manager if the lib directory is separated from the main source tree. @api public
URI_ESCAPE = URI.const_defined?("DEFAULT_PARSER") ? URI::DEFAULT_PARSER : URI   This is a hack around the fact that you can‘t instantiate a URI parser on 1.8, so we have to have this hacky stuff to work around it. When 1.8 support is dropped, we can remove this method.

@private

ATOMIC_WRITE_MUTEX = Mutex.new   @private
Callable = Struct.new(:name, :args, :splat, :environment, :tree, :has_content, :type)   A Sass mixin or function.

`name`: `String` : The name of the mixin/function.

`args`: `Array<(Script::Tree::Node, Script::Tree::Node)>` : The arguments for the mixin/function.

  Each element is a tuple containing the variable node of the argument
  and the parse tree for the default value of the argument.

`splat`: `Script::Tree::Node?` : The variable node of the splat argument for this callable, or null.

`environment`: {Sass::Environment} : The environment in which the mixin/function was defined.

  This is captured so that the mixin/function can have access
  to local variables defined in its scope.

`tree`: `Array<Tree::Node>` : The parse tree for the mixin/function.

`has_content`: `Boolean` : Whether the callable accepts a content block.

`type`: `String` : The user-friendly name of the type of the callable.

VERSION = version[:string] unless defined?(Sass::VERSION)   A string representing the version of Sass. A more fine-grained representation is available from Sass.version. @api public

Attributes

tests_running  [RW]  @private

Public Class methods

Compile a Sass or SCSS string to CSS. Defaults to SCSS.

@param contents [String] The contents of the Sass file. @param options [{Symbol => Object}] An options hash;

  see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}

@raise [Sass::SyntaxError] if there‘s an error in the document @raise [Encoding::UndefinedConversionError] if the source encoding

  cannot be converted to UTF-8

@raise [ArgumentError] if the document uses an unknown encoding with `@charset`

Compile a file on disk to CSS.

@raise [Sass::SyntaxError] if there‘s an error in the document @raise [Encoding::UndefinedConversionError] if the source encoding

  cannot be converted to UTF-8

@raise [ArgumentError] if the document uses an unknown encoding with `@charset`

@overload compile_file(filename, options = {})

  Return the compiled CSS rather than writing it to a file.

  @param filename [String] The path to the Sass, SCSS, or CSS file on disk.
  @param options [{Symbol => Object}] An options hash;
    see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
  @return [String] The compiled CSS.

@overload compile_file(filename, css_filename, options = {})

  Write the compiled CSS to a file.

  @param filename [String] The path to the Sass, SCSS, or CSS file on disk.
  @param options [{Symbol => Object}] An options hash;
    see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
  @param css_filename [String] The location to which to write the compiled CSS.

The global load paths for Sass files. This is meant for plugins and libraries to register the paths to their Sass stylesheets to that they may be `@imported`. This load path is used by every instance of {Sass::Engine}. They are lower-precedence than any load paths passed in via the {file:SASS_REFERENCE.md#load_paths-option `:load_paths` option}.

If the `SASS_PATH` environment variable is set, the initial value of `load_paths` will be initialized based on that. The variable should be a colon-separated list of path names (semicolon-separated on Windows).

Note that files on the global load path are never compiled to CSS themselves, even if they aren‘t partials. They exist only to be imported.

@example

  Sass.load_paths << File.dirname(__FILE__ + '/sass')

@return [Array<String, Pathname, Sass::Importers::Base>]

Public Instance methods

A cross-platform implementation of `File.absolute_path`.

@param path [String] @param dir_string [String] The directory to consider [path] relative to. @return [String] The absolute version of `path`.

This creates a temp file and yields it for writing. When the write is complete, the file is moved into the desired location. The atomicity of this operation is provided by the filesystem‘s rename operation.

@param filename [String] The file to write to. @param perms [Integer] The permissions used for creating this file.

  Will be masked by the process umask. Defaults to readable/writeable
  by all users however the umask usually changes this to only be writable
  by the process's user.

@yieldparam tmpfile [Tempfile] The temp file that can be written to. @return The value returned by the block.

Encodes `value` as VLQ (en.wikipedia.org/wiki/VLQ).

@param value [Integer] @return [String] The encoded value

URI-escape `string`.

@param string [String] @return [String]

[Validate]