Skip to content

Commit 6a3ed1b

Browse files
committed
refactor: correct relative paths in Sass @use statements & address Stylelint issues
Relative path issues: - Change @use 'config' to @use '../config' in base/ and components/ - Change @use 'config' to @use '../../config' in components/navigation/ Resolves sass-loader module resolution error during build Stylelint issues: 1. **Remove needless stylelint-disable comments** in _grid.scss and _pagination.scss that are no longer needed 2. **Fix @if null check** in _mixins.scss - change from `$variable == null` to `not $variable` (SCSS preferred syntax) 3. **Add interpolation for CSS custom properties** in _variables.scss - wrap all SCSS variables used inside `color.adjust()` with `#{}` 4. Update lint:css script in package.json -- Stylelint should only lint SCSS/CSS files
1 parent 0fca0fc commit 6a3ed1b

File tree

87 files changed

+130
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+130
-109
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"scripts": {
2222
"//[ Linting & formatting ]//": "",
23-
"lint:css": "stylelint --report-needless-disables './tbx/static_src/sass' './tbx/static_src/javascript/'",
23+
"lint:css": "stylelint --report-needless-disables './tbx/static_src/sass'",
2424
"lint:js": "eslint --ext .js,.ts,.tsx --report-unused-disable-directives .",
2525
"lint:format": "prettier --check '**/?(.)*.{md,css,scss,js,ts,tsx,json,yaml,yml,vue}'",
2626
"lint": "npm run lint:format && npm run lint:js && npm run lint:css",

tbx/static_src/sass/base/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Base styles. Some reset rules that would usually be here are now set by Preflight (see tailwind.config.js).
2-
@use 'config' as *;
2+
@use '../config' as *;
33
@use 'sass:color';
44

55
// Prevent text size change on orientation change.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
@font-face {
4-
font-family: 'Outfit';
4+
font-family: Outfit;
55
font-style: normal;
66
font-weight: 200 600; // Define the range of font weights to be used
77
font-display: swap;
8-
src: url(../fonts/outfit-variable-font.woff2) format('woff2-variations');
8+
src: url('../fonts/outfit-variable-font.woff2') format('woff2-variations');
99
}

tbx/static_src/sass/base/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22
@use 'sass:math';
33

44
/* ============================================

tbx/static_src/sass/components/_animated-icon.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
.animated-icon {
44
$root: &;

tbx/static_src/sass/components/_author.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
.authors {
44
grid-column: 2 / span 4;
@@ -51,6 +51,7 @@
5151
@include media-query(large) {
5252
margin-bottom: $spacer-small;
5353
}
54+
5455
.authors-wide & {
5556
@include media-query(large) {
5657
margin-bottom: 0;

tbx/static_src/sass/components/_authors-wide.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
// Authors component is wider than on the blog page and sits at the bottom
44
// Used on the work page and impact report page

tbx/static_src/sass/components/_avatar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
.avatar {
44
// Component-specific theme-less accent colors

tbx/static_src/sass/components/_blog-meta.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
.blog-meta {
44
margin: $spacer-small 0;

tbx/static_src/sass/components/_button-link.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use 'config' as *;
1+
@use '../config' as *;
22

33
.button-link {
44
$root: &;

0 commit comments

Comments
 (0)