Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: complete migration of tailwind config from v3 to v4 #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions templates/react-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@junobuild/config": "^0.1.0",
"@junobuild/vite-plugin": "^0.0.19",
"@tailwindcss/postcss": "^4.0.0",
"@tailwindcss/vite": "^4.0.5",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.4",
Expand Down
26 changes: 26 additions & 0 deletions templates/react-starter/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,29 @@
font-weight: 800;
src: url('./fonts/jetbrainsmono-bold.woff2') format('woff2');
}

@theme {
--font-display: 'JetBrains Mono', sans-serif;

--color-*: initial;
--color-inherit: inherit;
--color-transparent: transparent;
--color-current: currentColor;
--color-black: rgb(0 0 0);
--color-white: rgb(255 255 255);

--color-lavender-blue-50: #f2f3ff;
--color-lavender-blue-100: #e4e7ff;
--color-lavender-blue-200: #c9cfff;
--color-lavender-blue-300: #aeb8ff;
--color-lavender-blue-400: #93a0ff;
--color-lavender-blue-500: #7888ff;
--color-lavender-blue-600: #606dcc;
--color-lavender-blue-700: #485299;
--color-lavender-blue-800: #303666;
--color-lavender-blue-900: #181b33;
}

html {
font-family: var(--font-display);
}
29 changes: 2 additions & 27 deletions templates/react-starter/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
import {fontFamily} from 'tailwindcss/defaultTheme';

/** @type {import('tailwindcss').Config} */

export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
fontFamily: {
sans: ['JetBrains Mono', 'sans-serif', ...fontFamily.sans]
},
colors: {
inherit: 'inherit',
transparent: 'transparent',
current: 'currentColor',
black: 'rgb(0 0 0)',
white: 'rgb(255 255 255)',
['lavender-blue']: {
50: '#f2f3ff',
100: '#e4e7ff',
200: '#c9cfff',
300: '#aeb8ff',
400: '#93a0ff',
500: '#7888ff',
600: '#606dcc',
700: '#485299',
800: '#303666',
900: '#181b33'
}
}
}
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}']
};
3 changes: 2 additions & 1 deletion templates/react-starter/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import juno from '@junobuild/vite-plugin';
import react from '@vitejs/plugin-react';
import {defineConfig} from 'vite';
import {nodePolyfills} from 'vite-plugin-node-polyfills';
import tailwindcss from '@tailwindcss/vite'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), nodePolyfills(), juno({container: true})]
plugins: [react(), nodePolyfills(), juno({container: true}), tailwindcss()]
});