Skip to content

Commit 9624a0c

Browse files
committed
tailwind: v4
1 parent a89e41e commit 9624a0c

File tree

7 files changed

+56
-112
lines changed

7 files changed

+56
-112
lines changed

packages/lexical/TAILWIND_INTEGRATION.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

packages/lexical/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"stylelint-config-standard": "^24.0.0",
139139
"stylelint-prettier": "^2.0.0",
140140
"svg-url-loader": "^7.1.1",
141-
"tailwindcss": "^4.0.0",
141+
"tailwindcss": "^4.1.11",
142142
"typedoc": "^0.28.2",
143143
"typescript": "^5.8.3",
144144
"url-loader": "^3.0.0",

packages/lexical/postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ module.exports = {
22
plugins: {
33
'@tailwindcss/postcss': {},
44
autoprefixer: {},
5-
}
5+
},
66
};

packages/lexical/src/examples/AppNbformat.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ export function AppNbformat() {
126126
</LexicalProvider>
127127
</Jupyter>
128128
<div className="other App">
129+
<br/>
130+
<a href="https://datalayer.io" target="_blank">
131+
<ThreeBarsIcon/>
132+
</a>
133+
<h2>
134+
copyright © <a href="https://datalayer.io" target="_blank">2022-2024 Datalayer, Inc.</a>
135+
</h2>
136+
<ul>
137+
<li>
138+
<a href="https://github.com/datalayer/jupyter-ui" target="_blank">Jupyter UI open-source repository</a>
139+
</li>
140+
</ul>
141+
</div>
129142
{/* Tailwind v4 Button - Pure Utility Classes */}
130143
<div className="flex flex-col items-center gap-4 my-8">
131144
<button
@@ -141,19 +154,6 @@ export function AppNbformat() {
141154
</span>
142155
</div>
143156
</div>
144-
<br/>
145-
<a href="https://datalayer.io" target="_blank">
146-
<ThreeBarsIcon/>
147-
</a>
148-
<h2>
149-
copyright © <a href="https://datalayer.io" target="_blank">2022-2024 Datalayer, Inc.</a>
150-
</h2>
151-
<ul>
152-
<li>
153-
<a href="https://github.com/datalayer/jupyter-ui" target="_blank">Jupyter UI open-source repository</a>
154-
</li>
155-
</ul>
156-
</div>
157157
</>
158158
)
159159
}

packages/lexical/style/index.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
* MIT License
55
*/
66

7+
@import "tailwindcss";
8+
79
/* Import base styles */
810
@import url("base.css");
911

10-
/* Custom base styles */
11-
[contenteditable] {
12-
outline: 0px solid transparent;
13-
}
14-
1512
/* Import tailwind.css which now contains all the Tailwind v4 compatible styles */
1613
@import url('tailwind.css');
1714

packages/lexical/style/tailwind.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
* MIT License
55
*/
66

7-
@tailwind base;
8-
@tailwind components;
9-
@tailwind utilities;
7+
8+
@import url('./lexical/index.css');
109

1110
/* Custom variables for compatibility */
1211
:root {
@@ -31,5 +30,3 @@
3130
border-radius: 9999px;
3231
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
3332
}
34-
35-
@import url('./lexical/index.css');

packages/lexical/tailwind.config.js

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,43 @@ module.exports = {
77
'./style/**/*.{css}',
88
],
99
theme: {
10-
extend: {},
10+
extend: {
11+
colors: {
12+
border: "hsl(var(--border))",
13+
input: "hsl(var(--input))",
14+
ring: "hsl(var(--ring))",
15+
background: "hsl(var(--background))",
16+
foreground: "hsl(var(--foreground))",
17+
primary: {
18+
DEFAULT: "hsl(var(--primary))",
19+
foreground: "hsl(var(--primary-foreground))",
20+
},
21+
secondary: {
22+
DEFAULT: "hsl(var(--secondary))",
23+
foreground: "hsl(var(--secondary-foreground))",
24+
},
25+
destructive: {
26+
DEFAULT: "hsl(var(--destructive))",
27+
foreground: "hsl(var(--destructive-foreground))",
28+
},
29+
muted: {
30+
DEFAULT: "hsl(var(--muted))",
31+
foreground: "hsl(var(--muted-foreground))",
32+
},
33+
accent: {
34+
DEFAULT: "hsl(var(--accent))",
35+
foreground: "hsl(var(--accent-foreground))",
36+
},
37+
popover: {
38+
DEFAULT: "hsl(var(--popover))",
39+
foreground: "hsl(var(--popover-foreground))",
40+
},
41+
card: {
42+
DEFAULT: "hsl(var(--card))",
43+
foreground: "hsl(var(--card-foreground))",
44+
},
45+
},
46+
},
1147
},
1248
plugins: [],
1349
};

0 commit comments

Comments
 (0)