All features

Cherry Blossom feature

Frontend Enqueues: Style SCSS

Represents an SCSS entry point and its generated WordPress stylesheet.

Represents an SCSS entry point and its generated WordPress stylesheet.

Capabilities and extension points

Represents an SCSS entry point and its generated WordPress stylesheet.

Construction may compile the source when files, environment, theme identity, or theme URLs changed. The resulting CSS location is then registered through the normal style enqueue contract.

Sets up the Style_Generic object.

Based on the args, all properties will be set. At least a location or file (url) is required.

  • param string $handle The handle of the style.
  • param array $args The arguments for the style.

Compiles the entry point when its output or compilation context is stale.

Development requests always compile. The cherry/blossom/enqueue/enable_compiler filter can override the decision.

Determines whether this output matches the current theme and URL context.

  • return bool Whether the version marker matches.

Records a successful compilation for the current theme and URL context.

Builds the stable identifier for this generated output.

  • return string Compilation marker key.

Builds the signature for inputs that can change generated URLs or sources.

  • return string Compilation context signature.

Determines whether any active theme SCSS source is newer than this output.

Results are cached for one minute per output timestamp. Consumers that inject values without changing source files must request recompilation when those values change.

  • return bool Whether the generated CSS is stale or missing.

Compiles and writes this entry point through the SCSS facade.

Sets the file locations for the object.

  • param string|null $location Unminified file location.
  • param string|null $location_minified Unused.

Parses the locations into file paths.

Updates the file and file_minified properties based on the locations.

Parses the source URL from the location.

  • param string $location The file location.
  • return string The parsed source URL.

Parses the generated CSS path from an SCSS location.

WordPress must resolve the converted CSS location so a child-theme output can be selected even when the SCSS entry point only exists in the parent.

  • param string $location The SCSS file location.
  • return string The parsed CSS file path.

Exposes the autoprefixer setting alongside inherited virtual properties.

  • param string $param Property alias.
  • return mixed Property value, or null when unknown.

Determines whether generated CSS is passed through the autoprefixer.

  • return bool Whether autoprefixing is enabled.

Source reference

This editable reference page is based on the PHP documentation in frontend/enqueues/class-style-scss.php.