SCSS Component System Documentation

This document provides an overview of the reusable SCSS component system for the ASI Saga website. The component system is designed to reduce duplication, improve maintainability, and leverage Bootstrap’s functionality more effectively.

Overview

The component system is organized into reusable mixins that generate class-based styles when included in page-specific SCSS files. Components are prefixed by default but allow for custom prefixing when needed.

How to Use Components

To use a component in a page-specific SCSS file:

// Include the component with the default prefix
@include card-component();

// Or include with a custom prefix
@include card-component('custom-prefix');

Available Components

Card Components

File: _components/_card-component.scss

Image Card Components

File: _components/_image-card-component.scss

Section Components

File: _components/_section-component.scss

Layout Components

File: _components/_layout-component.scss

Form Components

File: _components/_form-component.scss

Team Components

File: _components/_team-component.scss

Header Components

File: _components/_header-component.scss

Content Section Components

File: _components/_content-section-component.scss

Hero Components

File: _components/_hero-component.scss

Products Grid Components

File: _components/_products-grid-component.scss

CTA Components

File: _components/_cta-component.scss

Best Practices

  1. Use component mixins instead of writing custom CSS wherever possible
  2. Keep page-specific SCSS files minimal by leveraging components
  3. Follow Bootstrap’s approach of extending utilities rather than writing custom CSS
  4. Use semantic prefixes that match the content (e.g., ‘team’, ‘product’, etc.)
  5. When customizing components, prefer mixin parameters over additional CSS
  6. Maintain consistent naming patterns across components for predictability