Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit 0d95a61

Browse files
bfirshclaude
andcommitted
Fix SCSS Bootstrap warnings
- Upgrade Bootstrap from 5.2.0 to 5.3.8 - Modernize SCSS to use @use instead of @import - Silence Bootstrap's internal Sass deprecation warnings in Vite config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7e84638 commit 0d95a61

5 files changed

Lines changed: 50 additions & 49 deletions

File tree

.claude/settings.local.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm view:*)",
5+
"Bash(ls:*)",
6+
"Bash(npm run build:*)",
7+
"Bash(npm test:*)"
8+
],
9+
"deny": []
10+
}
11+
}

package-lock.json

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"dependencies": {
77
"@popperjs/core": "^2.11.8",
8-
"bootstrap": "5.2.0",
8+
"bootstrap": "^5.3.8",
99
"jsnes": "git+ssh://git@github.com/bfirsh/jsnes.git",
1010
"prop-types": "^15.8.1",
1111
"raven-js": "^3.27.2",

src/index.scss

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,21 @@
1-
@import "bootstrap/scss/functions";
2-
@import "bootstrap/scss/variables";
3-
4-
// Bootstrap customization, where we're supposed to
5-
$enable-rounded: false;
6-
$enable-print-styles: false;
7-
8-
$body-bg: $black;
9-
$body-color: $gray-100;
10-
$link-color: $gray-100;
11-
$link-decoration: underline;
12-
$link-hover-color: $gray-500;
13-
$link-hover-decoration: underline;
14-
15-
$theme-colors: map-merge(
16-
$theme-colors,
17-
(
18-
primary: $white
19-
)
1+
// Override Bootstrap variables before importing
2+
@use "bootstrap/scss/bootstrap" with (
3+
$enable-rounded: false,
4+
$body-bg: #000,
5+
$body-color: #f8f9fa,
6+
$link-color: #f8f9fa,
7+
$link-decoration: underline,
8+
$link-hover-color: #6c757d,
9+
$link-hover-decoration: underline,
10+
$list-group-bg: #000,
11+
$list-group-border-color: #dee2e6,
12+
$table-border-color: #212529,
13+
$modal-content-bg: #000,
14+
$modal-header-border-width: 0,
15+
$modal-footer-border-width: 0,
16+
$btn-close-color: #fff
2017
);
2118

22-
$list-group-bg: $black;
23-
$list-group-border-color: $gray-300;
24-
25-
$table-border-color: $gray-900;
26-
27-
$modal-content-bg: $black;
28-
$modal-header-border-width: 0;
29-
$modal-footer-border-width: 0;
30-
31-
$close-color: $white;
32-
$close-text-shadow: none;
33-
34-
@import "bootstrap/scss/bootstrap";
35-
36-
// Bootstrap customization, where we're not supposed to
37-
38-
// Fix hover color being white
39-
@each $color, $value in $theme-colors {
40-
.btn-outline-#{$color} {
41-
@include button-outline-variant($value, $black);
42-
}
43-
}
44-
4519
html,
4620
body,
4721
#root {
@@ -123,3 +97,8 @@ img.controller-icon {
12397
h1 {
12498
font-size: 2.5rem;
12599
}
100+
101+
// Fix hover color being white for outline buttons
102+
.btn-outline-primary {
103+
--bs-btn-hover-bg: #000;
104+
}

vite.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ export default defineConfig({
66
build: {
77
outDir: "build",
88
},
9+
css: {
10+
preprocessorOptions: {
11+
scss: {
12+
silenceDeprecations: [
13+
"import",
14+
"global-builtin",
15+
"color-functions",
16+
"if-function",
17+
],
18+
},
19+
},
20+
},
921
server: {
1022
port: 3000,
1123
open: true,

0 commit comments

Comments
 (0)