Seed Spacing is a Sass (SCSS) utility pack that provides a comprehensive set of classes and a helper function for managing consistent margins and padding within projects built with the Seed CSS framework. It offers granular control over spacing values, directions, and responsive breakpoints. Currently at version 0.4.3, its release cadence is tied to updates in its core dependencies, particularly `seed-breakpoints`, making releases somewhat infrequent but purposeful. A key differentiator is its modular design, allowing developers to configure namespaces and define their own spacing scales via Sass variables, reducing unnecessary CSS output. It emphasizes functional CSS principles and integrates seamlessly into Sass build pipelines, generating utility classes and a `spacing($size)` function for use in custom SCSS. This approach ensures design consistency and optimizes stylesheet size.
npm install seed-spacingVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate `seed-spacing` into a Gulp build pipeline using `gulp-sass`, showing both JavaScript configuration and illustrative SCSS usage of utility classes, the `spacing()` function, and responsive modifiers.
Review your `$seed-spacing-sizes` and `seed-breakpoints` configurations. If you require `xl` or default `1-5em` sizes, you must explicitly define them in your project's Sass configuration.
Update all instances of responsive utility classes in your HTML and SCSS from the `prefix--at-size` format to the new `prefix@size` convention (e.g., `u-mrg--at-md-3` becomes `u-mrg@md-3`).
Update your SCSS `@import` statements from `@import "seed-spacing/__all";` to the new standard: `@import "pack/seed-spacing/_index";`.
Be mindful of increased specificity when using `auto` margin classes. If specificity conflicts arise, consider refining your selectors, adjusting the order of your CSS imports, or providing more specific overrides where necessary.
Update your SCSS `@import` statement to `@import "pack/seed-spacing/_index";`.
Locate and update all instances of responsive utility class names in your HTML and SCSS to use the new `@size` format (e.g., `u-mrg@lg-5`, `u-pad@sm-2`).
Ensure `seed-spacing` is correctly imported via `@import "pack/seed-spacing/_index";` in your SCSS. Also, verify that the argument passed to `spacing()` (e.g., `spacing(3)`) corresponds to a valid key in your `$seed-spacing-sizes` map.