Skip to content

Commit 2b532bc

Browse files
[dapp-kit] prefix all CSS with [data-dapp-kit] to prevent styles from getting overridden (#14210)
## Description While migrating SuiFrens over to dapp-kit, I noticed the styles coming from dapp-kit were getting overridden due to having low specificity. We can prefix all styles with `[data-dapp-kit]` to up the specificity and solve the issue, which is inline with what other UI kit libraries seem to do. As part of this, I'm upgrading postcss because the overrides specifier only works on the first clean `pnpm install` and I couldn't get a clean lockfile even on main 🤷🏼 Before: <img width="438" alt="image" src="https://github.com/MystenLabs/sui/assets/7453188/3c8a801c-e193-49ba-9585-836105d92740"> After: <img width="1722" alt="image" src="https://github.com/MystenLabs/sui/assets/7453188/c8486aa2-28b5-4670-a6f1-0bf663a6ab1f"> ## Test Plan - Manual testing - CI --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
1 parent 3480c70 commit 2b532bc

File tree

11 files changed

+126
-92
lines changed

11 files changed

+126
-92
lines changed

.changeset/friendly-rules-dance.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@mysten/dapp-kit': minor
3+
---
4+
5+
Fix issue where CSS was being overridden by application code

apps/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@tailwindcss/forms": "^0.5.4",
4545
"@types/react": "^18.2.15",
4646
"@vanilla-extract/vite-plugin": "^3.9.0",
47-
"postcss": "^8.4.26",
47+
"postcss": "^8.4.31",
4848
"tailwindcss": "^3.3.3",
4949
"typescript": "^5.1.6",
5050
"vite": "^4.4.4",

apps/explorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"autoprefixer": "^10.4.14",
104104
"happy-dom": "^10.5.1",
105105
"onchange": "^7.1.0",
106-
"postcss": "^8.4.26",
106+
"postcss": "^8.4.31",
107107
"start-server-and-test": "^2.0.0",
108108
"storybook": "^7.1.0",
109109
"tailwindcss": "^3.3.3",

apps/wallet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"html-webpack-plugin": "^5.5.3",
8383
"mini-css-extract-plugin": "^2.7.6",
8484
"onchange": "^7.1.0",
85-
"postcss": "^8.4.26",
85+
"postcss": "^8.4.31",
8686
"postcss-loader": "^7.3.3",
8787
"postcss-preset-env": "^9.0.0",
8888
"sass": "^1.63.6",

dapps/kiosk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@types/react-dom": "^18.2.7",
3434
"@vitejs/plugin-react": "^4.0.3",
3535
"autoprefixer": "^10.4.14",
36-
"postcss": "^8.4.26",
36+
"postcss": "^8.4.31",
3737
"tailwindcss": "^3.3.3",
3838
"typescript": "^5.1.6",
3939
"vite": "^4.4.4"

dapps/multisig-toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@types/react-dom": "^18.2.7",
4646
"@vitejs/plugin-react": "^4.0.3",
4747
"autoprefixer": "^10.4.14",
48-
"postcss": "^8.4.26",
48+
"postcss": "^8.4.31",
4949
"tailwindcss": "^3.3.3",
5050
"tailwindcss-animate": "^1.0.6",
5151
"typescript": "^5.1.6",

dapps/sponsored-transactions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@types/react-dom": "^18.2.7",
2525
"@vitejs/plugin-react": "^4.0.3",
2626
"autoprefixer": "^10.4.14",
27-
"postcss": "^8.4.26",
27+
"postcss": "^8.4.31",
2828
"tailwindcss": "^3.3.3",
2929
"typescript": "^5.1.6",
3030
"vite": "^4.4.4"

0 commit comments

Comments
 (0)