Why doesn't to-upper-case change the original variable?
Sass string functions return new strings; they do not modify variables in place. You must assign the result to a new variable or overwrite the old one (see render_steps 2).
💡 Think of string functions as making copies with changes, not editing originals.
Why does str-length count spaces and punctuation?
str-length counts every character including spaces and punctuation because strings are sequences of characters (see render_steps 3).
💡 All visible and invisible characters count in string length.
Why can't I use string functions directly in CSS properties without interpolation?
Sass functions run at compile time and produce values. To use strings in CSS properties, you often need to interpolate or assign to variables first (see render_steps 4).
💡 Use #{} to insert strings into CSS if needed.