Configure Stylesheet Loading
masterActiveScaffold supports both Sprockets and Propshaft. Since version 4.3, colors are primarily managed via CSS variables, though SASS variables are still supported for backward compatibility.
Using Propshaft + dartsass-rails
Because Propshaft does not support .erb files for CSS, ActiveScaffold generates a SCSS file during development and precompilation. You can manually trigger generation using active_scaffold:assets:generate.
To use it in your application.scss:
@use 'active_scaffold/core' with (
// set values to variables
);Using Sprockets + dartsass-sprockets
You can load the entire ActiveScaffold suite (including jQuery UI and plugin CSS) with a single directive:
@use 'active_scaffold' with (
// set values to variables
);For granular control, you can import individual files:
@use 'active_scaffold/variables' with (...);
@use 'active_scaffold/colours';
@use 'active_scaffold/layout';
@use 'active_scaffold/images';// Propshaft example
@use 'active_scaffold/core' with (
// set values to variables
);
// Sprockets example
@use 'active_scaffold' with (
// set values to variables
);