Class Sass::Script::Value::String
In: lib/sass/script/value/string.rb
Parent: Base

A SassScript object representing a CSS string or a CSS identifier.

Methods

inspect   new   plus   quote   to_s   to_sass   value  

Attributes

type  [R]  Whether this is a CSS string or a CSS identifier. The difference is that strings are written with double-quotes, while identifiers aren‘t.

@return [Symbol] `:string` or `:identifier`

value  [R]  The Ruby value of the string.

@return [String]

Public Class methods

Creates a new string.

@param value [String] See \{value} @param type [Symbol] See \{type}

Returns the quoted string representation of `contents`.

@options opts :quote [String]

  The preferred quote style for quoted strings. If `:none`, strings are
  always emitted unquoted. If `nil`, quoting is determined automatically.

@options opts :sass [String]

  Whether to quote strings for Sass source, as opposed to CSS. Defaults to `false`.

Public Instance methods

@see Value#plus

@see Value#to_s

@see Value#to_sass

[Validate]