Skip to content

Commit 3586db3

Browse files
committed
Merge branch 'tailwindcss-v4' into feature/jan2025-update-dependencies
2 parents 7972f86 + 97df25a commit 3586db3

7 files changed

Lines changed: 435 additions & 513 deletions

File tree

apps/solidjs-boilerplate/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
"@playwright/test": "^1.53.1",
2727
"@secretlint/secretlint-rule-preset-recommend": "^10.1.0",
2828
"@solidjs/testing-library": "^0.8.10",
29-
"@tailwindcss/forms": "^0.5.10",
30-
"@tailwindcss/line-clamp": "^0.4.4",
3129
"@testing-library/dom": "^10.4.0",
3230
"@testing-library/jest-dom": "^6.6.3",
3331
"@testing-library/user-event": "^14.6.1",
@@ -80,7 +78,7 @@
8078
"stylelint-config-recess-order": "^7.1.0",
8179
"stylelint-config-standard": "^38.0.0",
8280
"stylelint-prettier": "^5.0.3",
83-
"tailwindcss": "^3.4.1",
81+
"tailwindcss": "^4.1.10",
8482
"typescript": "^5.8.3",
8583
"vite": "^6.3.5",
8684
"vite-plugin-solid": "^2.11.6",
@@ -91,6 +89,7 @@
9189
"@sect/solid-hiding-header": "workspace:*",
9290
"@solidjs/meta": "^0.29.4",
9391
"@solidjs/router": "^0.15.3",
92+
"@tailwindcss/vite": "^4.1.10",
9493
"@tanstack/solid-query": "^5.80.10",
9594
"escape-goat": "^4.0.0",
9695
"isomorphic-dompurify": "^2.25.0",

apps/solidjs-boilerplate/postcss.config.cjs

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["postcss-import", "postcss-nesting", "@tailwindcss/postcss"]
3+
}

apps/solidjs-boilerplate/src/styles/globals.css

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,52 @@
1-
@import url('base/settings.css');
2-
@import url('base/svg.css');
3-
@import url('libs/hiding-header.css');
1+
@import url('base/settings.css') layer(base);
2+
@import url('base/svg.css') layer(base);
3+
@import url('libs/hiding-header.css') layer(base);
4+
5+
@import 'tailwindcss';
6+
7+
@theme {
8+
/* remove `line-height` from `text-{size}` */
9+
--text-*: initial;
10+
--text-xs: 12px;
11+
--text-sm: 14px;
12+
--text-base: 16px;
13+
--text-lg: 18px;
14+
--text-xl: 20px;
15+
--text-2xl: 24px;
16+
--text-3xl: 30px;
17+
--text-4xl: 36px;
18+
--text-5xl: 48px;
19+
--text-6xl: 60px;
20+
--text-7xl: 72px;
21+
--text-8xl: 96px;
22+
--text-9xl: 128px;
23+
}
24+
25+
/*
26+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
27+
so we've added these compatibility styles to make sure everything still
28+
looks the same as it did with Tailwind CSS v3.
29+
30+
If we ever want to remove these styles, we need to add an explicit border
31+
color utility to any element that depends on these defaults.
32+
*/
33+
@layer base {
34+
*,
35+
::after,
36+
::before,
37+
::backdrop,
38+
::file-selector-button {
39+
border-color: var(--color-gray-200, currentcolor);
40+
}
41+
}
42+
43+
@utility inner {
44+
@apply w-full px-4 md:max-w-(--breakpoint-2xl) md:px-16 md:mx-auto;
45+
/* @media (--viewport-medium) {
46+
47+
} */
48+
}
449

5-
@tailwind base;
6-
@tailwind components;
7-
@tailwind utilities;
850
/* @ https://tailwindcss.jp/docs/functions-and-directives#layer */
951
@layer base {
1052
html {
@@ -45,21 +87,17 @@
4587

4688
@layer components {
4789
body {
48-
@apply font-sans text-base font-bold leading-normal text-black antialiased;
90+
font-family: 'Noto Sans JP', sans-serif;
91+
font-size: 16px;
92+
font-weight: bold;
93+
line-height: 1.5;
94+
color: #000;
95+
-webkit-font-smoothing: antialiased;
4996
}
5097

5198
#root {
52-
@apply flex flex-col min-h-screen;
53-
}
54-
55-
article {
56-
@apply h-article;
99+
display: flex;
100+
flex-direction: column;
101+
min-height: 100vh;
57102
}
58-
59-
.inner {
60-
@apply w-full px-4 md:max-w-screen-2xl md:px-16 md:mx-auto;
61-
}
62-
/* @media (--viewport-medium) {
63-
64-
} */
65103
}

apps/solidjs-boilerplate/tailwind.config.js

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

apps/solidjs-boilerplate/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import solidPlugin from 'vite-plugin-solid';
44
import tsconfigPaths from 'vite-tsconfig-paths';
55
import { defineConfig } from 'vitest/config';
6+
import tailwindcss from '@tailwindcss/vite';
67

78
export default defineConfig({
8-
plugins: [solidPlugin(), tsconfigPaths()],
9+
plugins: [solidPlugin(), tsconfigPaths(), tailwindcss()],
910
server: {
1011
port: 3000,
1112
},

0 commit comments

Comments
 (0)