Unit tests for LESS/SCSS

Also fixes for #8894 and #8895.
This should be `@return {string}`. The `?` indicates nullable, and return value can be empty, but not null.