Documentations › mmo.client › php › scs Result MMO\client\scs · 1 symbol · generated 30 Sep 2026
The outcome of a compilation: the generated css, plus the compile-time variables it evaluated.
class MMO\client\scs\Result
implements Stringable Namespace MMO\client\scsImplements Stringable The extracted values are compile-time data -- they are *not* css custom properties (`the` spec, 48B.7),
which is exactly what makes them useful to an application that needs the same number the stylesheet used. $result = SCSCompiler::Shared()->compileText($source, ['density' => 2]);
echo $result->css();
$result->phpValue('spacing'); // '16px'
Properties4 protected string $css Type string protected ?MMO\client\scs\SourceMap $map Type null | SourceMap protected array $themes Type array protected array $values Type array Methods8 function css(): string function map(): ?MMO\client\scs\SourceMap returns null | SourceMap where every selector and declaration came from, null when no map was asked for
file_put_contents('app.css.map', $result->map()->toJson());
function phpValue(string $name): mixed $name string returns mixed the variable as plain php ('16px', 2, ['a', 'b'], ...)
function themes(): array returns array the declared design tokens: scope => [dotted path => Value]
function value(string $name): ?MMO\client\scs\Value $name string the variable name, with or without its $ returns null | Value null when the stylesheet never declared it
function values(): array returns array every compile-time variable left in the global scope
function __construct(
string $css,
array $values = [],
array $themes = [],
?MMO\client\scs\SourceMap $map = null
) $css string $values = [] array compile-time variable name (without the $) => value $themes = [] array theme scope => [dotted path => Value] $map = null null | SourceMap the source map, when the compilation was asked for one
function __toString(): string