Skip to content

Commit 5770cd8

Browse files
authored
Fix tailwind not showing on frontend (#6)
Use postcss for tailwind instead of cli. Followed shadcn manual installation docs
1 parent b827184 commit 5770cd8

File tree

12 files changed

+196
-368
lines changed

12 files changed

+196
-368
lines changed

project/apps/web/app/favicon.ico

-25.3 KB
Binary file not shown.
-66.3 KB
Binary file not shown.
-64.7 KB
Binary file not shown.

project/apps/web/app/globals.css

Lines changed: 58 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,72 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
:root {
5-
--background: #ffffff;
6-
--foreground: #171717;
7-
}
84

9-
@media (prefers-color-scheme: dark) {
5+
@layer base {
106
:root {
11-
--background: #0a0a0a;
12-
--foreground: #ededed;
13-
}
14-
}
7+
--background: 0 0% 100%;
8+
--foreground: 222.2 47.4% 11.2%;
159

16-
html,
17-
body {
18-
max-width: 100vw;
19-
overflow-x: hidden;
20-
}
10+
--muted: 210 40% 96.1%;
11+
--muted-foreground: 215.4 16.3% 46.9%;
2112

22-
body {
23-
color: var(--foreground);
24-
background: var(--background);
25-
}
13+
--popover: 0 0% 100%;
14+
--popover-foreground: 222.2 47.4% 11.2%;
2615

27-
* {
28-
box-sizing: border-box;
29-
padding: 0;
30-
margin: 0;
31-
}
16+
--border: 214.3 31.8% 91.4%;
17+
--input: 214.3 31.8% 91.4%;
3218

33-
a {
34-
color: inherit;
35-
text-decoration: none;
36-
}
19+
--card: 0 0% 100%;
20+
--card-foreground: 222.2 47.4% 11.2%;
3721

38-
@media (prefers-color-scheme: dark) {
39-
html {
40-
color-scheme: dark;
41-
}
42-
}
22+
--primary: 222.2 47.4% 11.2%;
23+
--primary-foreground: 210 40% 98%;
24+
25+
--secondary: 210 40% 96.1%;
26+
--secondary-foreground: 222.2 47.4% 11.2%;
27+
28+
--accent: 210 40% 96.1%;
29+
--accent-foreground: 222.2 47.4% 11.2%;
30+
31+
--destructive: 0 100% 50%;
32+
--destructive-foreground: 210 40% 98%;
33+
34+
--ring: 215 20.2% 65.1%;
4335

44-
@layer base {
45-
:root {
46-
--background: 0 0% 100%;
47-
--foreground: 0 0% 3.9%;
48-
--card: 0 0% 100%;
49-
--card-foreground: 0 0% 3.9%;
50-
--popover: 0 0% 100%;
51-
--popover-foreground: 0 0% 3.9%;
52-
--primary: 0 0% 9%;
53-
--primary-foreground: 0 0% 98%;
54-
--secondary: 0 0% 96.1%;
55-
--secondary-foreground: 0 0% 9%;
56-
--muted: 0 0% 96.1%;
57-
--muted-foreground: 0 0% 45.1%;
58-
--accent: 0 0% 96.1%;
59-
--accent-foreground: 0 0% 9%;
60-
--destructive: 0 84.2% 60.2%;
61-
--destructive-foreground: 0 0% 98%;
62-
--border: 0 0% 89.8%;
63-
--input: 0 0% 89.8%;
64-
--ring: 0 0% 3.9%;
65-
--chart-1: 12 76% 61%;
66-
--chart-2: 173 58% 39%;
67-
--chart-3: 197 37% 24%;
68-
--chart-4: 43 74% 66%;
69-
--chart-5: 27 87% 67%;
7036
--radius: 0.5rem;
7137
}
38+
7239
.dark {
73-
--background: 0 0% 3.9%;
74-
--foreground: 0 0% 98%;
75-
--card: 0 0% 3.9%;
76-
--card-foreground: 0 0% 98%;
77-
--popover: 0 0% 3.9%;
78-
--popover-foreground: 0 0% 98%;
79-
--primary: 0 0% 98%;
80-
--primary-foreground: 0 0% 9%;
81-
--secondary: 0 0% 14.9%;
82-
--secondary-foreground: 0 0% 98%;
83-
--muted: 0 0% 14.9%;
84-
--muted-foreground: 0 0% 63.9%;
85-
--accent: 0 0% 14.9%;
86-
--accent-foreground: 0 0% 98%;
87-
--destructive: 0 62.8% 30.6%;
88-
--destructive-foreground: 0 0% 98%;
89-
--border: 0 0% 14.9%;
90-
--input: 0 0% 14.9%;
91-
--ring: 0 0% 83.1%;
92-
--chart-1: 220 70% 50%;
93-
--chart-2: 160 60% 45%;
94-
--chart-3: 30 80% 55%;
95-
--chart-4: 280 65% 60%;
96-
--chart-5: 340 75% 55%;
40+
--background: 224 71% 4%;
41+
--foreground: 213 31% 91%;
42+
43+
--muted: 223 47% 11%;
44+
--muted-foreground: 215.4 16.3% 56.9%;
45+
46+
--accent: 216 34% 17%;
47+
--accent-foreground: 210 40% 98%;
48+
49+
--popover: 224 71% 4%;
50+
--popover-foreground: 215 20.2% 65.1%;
51+
52+
--border: 216 34% 17%;
53+
--input: 216 34% 17%;
54+
55+
--card: 224 71% 4%;
56+
--card-foreground: 213 31% 91%;
57+
58+
--primary: 210 40% 98%;
59+
--primary-foreground: 222.2 47.4% 1.2%;
60+
61+
--secondary: 222.2 47.4% 11.2%;
62+
--secondary-foreground: 210 40% 98%;
63+
64+
--destructive: 0 63% 31%;
65+
--destructive-foreground: 210 40% 98%;
66+
67+
--ring: 216 34% 17%;
68+
69+
--radius: 0.5rem;
9770
}
9871
}
9972

@@ -103,5 +76,8 @@ a {
10376
}
10477
body {
10578
@apply bg-background text-foreground;
79+
font-feature-settings:
80+
"rlig" 1,
81+
"calt" 1;
10682
}
10783
}

project/apps/web/app/layout.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import type { Metadata } from "next";
2-
import localFont from "next/font/local";
32
import "./globals.css";
43

5-
const geistSans = localFont({
6-
src: "./fonts/GeistVF.woff",
7-
variable: "--font-geist-sans",
8-
});
9-
const geistMono = localFont({
10-
src: "./fonts/GeistMonoVF.woff",
11-
variable: "--font-geist-mono",
12-
});
13-
144
export const metadata: Metadata = {
155
title: "Create Next App",
166
description: "Generated by create next app",
@@ -23,9 +13,7 @@ export default function RootLayout({
2313
}>) {
2414
return (
2515
<html lang="en">
26-
<body className={`${geistSans.variable} ${geistMono.variable}`}>
27-
{children}
28-
</body>
16+
<body>{children}</body>
2917
</html>
3018
);
3119
}
Lines changed: 0 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -1,188 +0,0 @@
1-
.page {
2-
--gray-rgb: 0, 0, 0;
3-
--gray-alpha-200: rgba(var(--gray-rgb), 0.08);
4-
--gray-alpha-100: rgba(var(--gray-rgb), 0.05);
5-
6-
--button-primary-hover: #383838;
7-
--button-secondary-hover: #f2f2f2;
8-
9-
display: grid;
10-
grid-template-rows: 20px 1fr 20px;
11-
align-items: center;
12-
justify-items: center;
13-
min-height: 100svh;
14-
padding: 80px;
15-
gap: 64px;
16-
font-synthesis: none;
17-
}
18-
19-
@media (prefers-color-scheme: dark) {
20-
.page {
21-
--gray-rgb: 255, 255, 255;
22-
--gray-alpha-200: rgba(var(--gray-rgb), 0.145);
23-
--gray-alpha-100: rgba(var(--gray-rgb), 0.06);
24-
25-
--button-primary-hover: #ccc;
26-
--button-secondary-hover: #1a1a1a;
27-
}
28-
}
29-
30-
.main {
31-
display: flex;
32-
flex-direction: column;
33-
gap: 32px;
34-
grid-row-start: 2;
35-
}
36-
37-
.main ol {
38-
font-family: var(--font-geist-mono);
39-
padding-left: 0;
40-
margin: 0;
41-
font-size: 14px;
42-
line-height: 24px;
43-
letter-spacing: -0.01em;
44-
list-style-position: inside;
45-
}
46-
47-
.main li:not(:last-of-type) {
48-
margin-bottom: 8px;
49-
}
50-
51-
.main code {
52-
font-family: inherit;
53-
background: var(--gray-alpha-100);
54-
padding: 2px 4px;
55-
border-radius: 4px;
56-
font-weight: 600;
57-
}
58-
59-
.ctas {
60-
display: flex;
61-
gap: 16px;
62-
}
63-
64-
.ctas a {
65-
appearance: none;
66-
border-radius: 128px;
67-
height: 48px;
68-
padding: 0 20px;
69-
border: none;
70-
font-family: var(--font-geist-sans);
71-
border: 1px solid transparent;
72-
transition: background 0.2s, color 0.2s, border-color 0.2s;
73-
cursor: pointer;
74-
display: flex;
75-
align-items: center;
76-
justify-content: center;
77-
font-size: 16px;
78-
line-height: 20px;
79-
font-weight: 500;
80-
}
81-
82-
a.primary {
83-
background: var(--foreground);
84-
color: var(--background);
85-
gap: 8px;
86-
}
87-
88-
a.secondary {
89-
border-color: var(--gray-alpha-200);
90-
min-width: 180px;
91-
}
92-
93-
button.secondary {
94-
appearance: none;
95-
border-radius: 128px;
96-
height: 48px;
97-
padding: 0 20px;
98-
border: none;
99-
font-family: var(--font-geist-sans);
100-
border: 1px solid transparent;
101-
transition: background 0.2s, color 0.2s, border-color 0.2s;
102-
cursor: pointer;
103-
display: flex;
104-
align-items: center;
105-
justify-content: center;
106-
font-size: 16px;
107-
line-height: 20px;
108-
font-weight: 500;
109-
background: transparent;
110-
border-color: var(--gray-alpha-200);
111-
min-width: 180px;
112-
}
113-
114-
.footer {
115-
font-family: var(--font-geist-sans);
116-
grid-row-start: 3;
117-
display: flex;
118-
gap: 24px;
119-
}
120-
121-
.footer a {
122-
display: flex;
123-
align-items: center;
124-
gap: 8px;
125-
}
126-
127-
.footer img {
128-
flex-shrink: 0;
129-
}
130-
131-
/* Enable hover only on non-touch devices */
132-
@media (hover: hover) and (pointer: fine) {
133-
a.primary:hover {
134-
background: var(--button-primary-hover);
135-
border-color: transparent;
136-
}
137-
138-
a.secondary:hover {
139-
background: var(--button-secondary-hover);
140-
border-color: transparent;
141-
}
142-
143-
.footer a:hover {
144-
text-decoration: underline;
145-
text-underline-offset: 4px;
146-
}
147-
}
148-
149-
@media (max-width: 600px) {
150-
.page {
151-
padding: 32px;
152-
padding-bottom: 80px;
153-
}
154-
155-
.main {
156-
align-items: center;
157-
}
158-
159-
.main ol {
160-
text-align: center;
161-
}
162-
163-
.ctas {
164-
flex-direction: column;
165-
}
166-
167-
.ctas a {
168-
font-size: 14px;
169-
height: 40px;
170-
padding: 0 16px;
171-
}
172-
173-
a.secondary {
174-
min-width: auto;
175-
}
176-
177-
.footer {
178-
flex-wrap: wrap;
179-
align-items: center;
180-
justify-content: center;
181-
}
182-
}
183-
184-
@media (prefers-color-scheme: dark) {
185-
.logo {
186-
filter: invert();
187-
}
188-
}

0 commit comments

Comments
 (0)