String

Sass's string type.

⚠️ Heads up!

This API currently provides no way of distinguishing between a quoted and unquoted string.

Hierarchy

  • String

Constructors

Methods

Constructors

Methods

  • Returns the contents of the string. If the string contains escapes, those escapes are included literally if it’s unquoted, while the values of the escapes are included if it’s quoted.

    Example

    // string is `Arial`.
    string.getValue(); // "Arial"

    // string is `"Helvetica Neue"`.
    string.getValue(); // "Helvetica Neue"

    // string is `\1F46D`.
    string.getValue(); // "\\1F46D"

    // string is `"\1F46D"`.
    string.getValue(); // "👭"

    Returns string

  • Destructively modifies this string by setting its numeric value to value.

    ⚠️ Heads up!

    Even if the string was originally quoted, this will cause it to become unquoted.

    Deprecated

    Use constructor instead.

    Parameters

    • value: string

    Returns void