Hwaro::Assets::Sass::Str
Inherits Hwaro::Assets::Sass::Value < Reference < Object
Constructors
Class methods
Inverse of decode for a computed result: backslashes and
unprintable / private-use code points are escaped (an icon-font
glyph stays \e900), everything else is kept literal. A quote
needs no escape here — to_css picks a quote that fits.
a + b on string text: a trailing hex escape would swallow a
following hex digit ("\f101" + "a" must stay U+F101), so it is
terminated with a space.
text as unquote() hands it out: a single-character escape
(\", \', \\, \:) is only an escape inside quotes, so it
becomes that character, and an escaped newline is a line
continuation. Hex escapes (\f101) stay verbatim: they mean the
same code point unquoted (dart-sass prints them back the same).
Instance methods
The code points the text denotes: \e900 is one character, \"
is a quote. text keeps the escapes verbatim so strings pass
through byte-identically; string functions and == work on this.
Sass equality (==). Subclasses override; default is identity
on serialized text.
CSS text for this value when it lands inside #{...}. dart-sass
renders strings UNQUOTED at every nesting level there, so a list
of quoted strings interpolates as a, b — "a", "b" would ship
invalid CSS (content: ""a", "b""). Only Str and the
containers that hold values override this.