Skip to content

Commit 99c1246

Browse files
committed
refactor: use @forward instead of @import
1 parent caeb1b7 commit 99c1246

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

src/scss/base.scss

+20-14
Original file line numberDiff line numberDiff line change
@@ -29,46 +29,52 @@
2929
// If using features such as custom properties, those that are global
3030
// custom properties should be described in this section.
3131

32+
// Most likely, these will be imported via @use in other files, not
33+
// included in this entry point file.
34+
3235
// =====================================================================
3336
// 2. Tools
3437
// This section is specifically for preprocessor global mixins and
3538
// functions. No CSS should be generated by the preprocessor from
3639
// partials in this section.
3740

41+
// Most likely, these will be imported via @use in other files, not
42+
// included in this entry point file.
43+
3844
// =====================================================================
3945
// 3. Generic
4046
// Here we define any generic styles that are not specific to the styles of
4147
// the site. This section should include any Reset or Normalize libraries
4248
// and any preferential base styles for elements. There shouldn’t be any
4349
// classes or ids used in this section.
44-
@import 'generic/reset';
50+
@forward 'generic/reset';
4551

4652
// =====================================================================
4753
// 4. Elements
4854
// Styling for bare HTML elements (like H1, A, etc.). These come with
4955
// default styling from the browser so we can redefine them here.
50-
@import 'elements/root';
51-
@import 'elements/a';
52-
@import 'elements/h1-6';
53-
@import 'elements/p';
56+
@forward 'elements/root';
57+
@forward 'elements/a';
58+
@forward 'elements/h1-6';
59+
@forward 'elements/p';
5460

5561
// =====================================================================
5662
// 5. Objects
5763
// Class-based selectors which define undecorated design patterns,
5864
// for example media object known from OOCSS.
59-
@import 'object/width-limiter';
65+
@forward 'object/width-limiter';
6066

6167
// =====================================================================
6268
// 6. Components
6369
// Specific UI components. This is where majority of our work takes place
6470
// and our UI components are often composed of Objects and Components
65-
@import 'components/main-nav';
66-
@import 'components/pagination';
67-
@import 'components/post-preview';
68-
@import 'components/primary-sidebar';
69-
@import 'components/post-body';
70-
@import 'components/skip-to-content';
71-
@import 'components/sticky-footer';
71+
@forward 'components/main-nav';
72+
@forward 'components/pagination';
73+
@forward 'components/post-preview';
74+
@forward 'components/primary-sidebar';
75+
@forward 'components/post-body';
76+
@forward 'components/skip-to-content';
77+
@forward 'components/sticky-footer';
7278

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

0 commit comments

Comments
 (0)