Skip to content

Commit c9f6d11

Browse files
committed
remove postcss deps and update css imports for explicit ordering
1 parent ab76183 commit c9f6d11

File tree

3 files changed

+19
-170
lines changed

3 files changed

+19
-170
lines changed

app/ui/styles/index.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
/*
1010
* We import all of these here instead of in the corresponding component files
11-
* so we can control the order things are imported in. In theory that's what the
12-
* @layer directives are for, but Vite's usage of postcss-import didn't seem
13-
* to be aware of the @tailwind directives here. I suspect it was not following
14-
* the order specified in our postcss config. In any case we don't need to worry
15-
* about that if we're controlling the order directly here. All of these end up
16-
* inlined into a single file by postcss-import.
11+
* so we can control the order things are imported in. Tailwind v4 uses native
12+
* CSS cascade layers (@layer), and the first @layer declaration establishes
13+
* precedence order. Each @import can be assigned to a layer using layer()
14+
* syntax, ensuring predictable specificity regardless of import order.
1715
*/
1816

17+
@layer base, components, utilities;
18+
1919
@import 'tailwindcss';
2020

2121
@import '@oxide/design-system/styles/tailwind.css';
@@ -24,19 +24,19 @@
2424

2525
@import './fonts.css' layer(base);
2626
@import './vars.css' layer(base);
27-
@import './components/button.css';
28-
@import './components/menu-button.css';
29-
@import './components/menu-list.css';
30-
@import './components/loading-bar.css';
31-
@import './components/Tabs.css';
32-
@import './components/form.css';
33-
@import './components/login-page.css';
34-
@import './components/mini-table.css';
35-
@import './components/side-modal.css';
36-
@import './components/spinner.css';
37-
@import './components/table.css';
38-
@import './components/tooltip.css';
39-
@import './themes/selection.css';
27+
@import './components/button.css' layer(components);
28+
@import './components/menu-button.css' layer(components);
29+
@import './components/menu-list.css' layer(components);
30+
@import './components/loading-bar.css' layer(components);
31+
@import './components/Tabs.css' layer(components);
32+
@import './components/form.css' layer(components);
33+
@import './components/login-page.css' layer(components);
34+
@import './components/mini-table.css' layer(components);
35+
@import './components/side-modal.css' layer(components);
36+
@import './components/spinner.css' layer(components);
37+
@import './components/table.css' layer(components);
38+
@import './components/tooltip.css' layer(components);
39+
@import './themes/selection.css' layer(components);
4040

4141
@import '@xterm/xterm/css/xterm.css' layer(components);
4242
@source '../../../node_modules/@oxide/design-system/dist';

package-lock.json

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

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@
124124
"oxlint-tsgolint": "^0.2.0",
125125
"patch-package": "^8.0.0",
126126
"postcss": "^8.4.49",
127-
"postcss-import": "^16.1.0",
128-
"postcss-nesting": "^13.0.1",
129127
"postcss-pseudo-classes": "^0.4.0",
130128
"prettier": "^3.4.2",
131129
"prettier-plugin-tailwindcss": "^0.6.14",

0 commit comments

Comments
 (0)