Skip to content

Commit

Permalink
refactor: use @forward instead of @import
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin-jw committed Oct 24, 2023
1 parent caeb1b7 commit 99c1246
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions src/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,46 +29,52 @@
// If using features such as custom properties, those that are global
// custom properties should be described in this section.

// Most likely, these will be imported via @use in other files, not
// included in this entry point file.

// =====================================================================
// 2. Tools
// This section is specifically for preprocessor global mixins and
// functions. No CSS should be generated by the preprocessor from
// partials in this section.

// Most likely, these will be imported via @use in other files, not
// included in this entry point file.

// =====================================================================
// 3. Generic
// Here we define any generic styles that are not specific to the styles of
// the site. This section should include any Reset or Normalize libraries
// and any preferential base styles for elements. There shouldn’t be any
// classes or ids used in this section.
@import 'generic/reset';
@forward 'generic/reset';

// =====================================================================
// 4. Elements
// Styling for bare HTML elements (like H1, A, etc.). These come with
// default styling from the browser so we can redefine them here.
@import 'elements/root';
@import 'elements/a';
@import 'elements/h1-6';
@import 'elements/p';
@forward 'elements/root';
@forward 'elements/a';
@forward 'elements/h1-6';
@forward 'elements/p';

// =====================================================================
// 5. Objects
// Class-based selectors which define undecorated design patterns,
// for example media object known from OOCSS.
@import 'object/width-limiter';
@forward 'object/width-limiter';

// =====================================================================
// 6. Components
// Specific UI components. This is where majority of our work takes place
// and our UI components are often composed of Objects and Components
@import 'components/main-nav';
@import 'components/pagination';
@import 'components/post-preview';
@import 'components/primary-sidebar';
@import 'components/post-body';
@import 'components/skip-to-content';
@import 'components/sticky-footer';
@forward 'components/main-nav';
@forward 'components/pagination';
@forward 'components/post-preview';
@forward 'components/primary-sidebar';
@forward 'components/post-body';
@forward 'components/skip-to-content';
@forward 'components/sticky-footer';

// =====================================================================
// 7. Vendors
Expand All @@ -81,4 +87,4 @@
// 8. Utilities
// Utilities and helper classes with ability to override anything
// which goes before in the triangle, eg. hide helper class
@import 'utilities/visually-hidden';
@forward 'utilities/visually-hidden';

0 comments on commit 99c1246

Please sign in to comment.