Skip to content

Commit eea1f2a

Browse files
committed
Fix and fully test, now i have custom colors to support tailwindcss 4, not 3
1 parent d1a0a14 commit eea1f2a

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
dist

index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@ <h2 class="text-2xl font-bold text-table-header mb-2">Card Title 2</h2>
3535
</a>
3636
</footer>
3737

38+
<h1 class="text-4xl font-bold text-table-header">Hello</h1>
39+
<p class="text-highlight">Custom color paragraph</p>
40+
<a class="bg-table-header text-white px-4 py-2 rounded hover:bg-highlight">Button</a>
41+
3842
</body>
3943
</html>

tailwind.config.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
/** @type {import('tailwindcss').Config} */
22
module.exports = {
3-
content: ['./*.html', './*.js'],
3+
content: [
4+
'./*.html',
5+
'./**/*.html',
6+
'./*.js',
7+
'./**/*.js'
8+
],
9+
safelist: [
10+
'bg-table-header',
11+
'text-highlight',
12+
],
413
theme: {
514
extend: {
615
colors: {
7-
'table-header': '#091a52',
8-
'highlight': '#ff5733',
16+
// 'table-header': '#091a52',
17+
// 'highlight': '#ff5733',
918
},
1019
},
1120
},
12-
safelist: ['bg-table-header', 'text-highlight'],
1321
plugins: [],
1422
};

tailwind.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
@theme {
6+
--color-table-header: #091a52;
7+
--color-highlight: #ff5733;
8+
}

0 commit comments

Comments
 (0)