From 99c12466e18d824d9358b6c8ed9ba3dd9bf32866 Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Mon, 23 Oct 2023 15:58:59 -0600 Subject: [PATCH] refactor: use @forward instead of @import --- src/scss/base.scss | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/scss/base.scss b/src/scss/base.scss index 965eae4..ed0645d 100644 --- a/src/scss/base.scss +++ b/src/scss/base.scss @@ -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 @@ -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';