Skip to content

Commit ae6260e

Browse files
committed
Install Tailwind and PostCSS
1 parent 77fb808 commit ae6260e

9 files changed

+870
-134
lines changed

frontend/src/App.svelte

+5-38
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,13 @@
11
<script lang="ts">
2-
import viteLogo from "./assets/vite.svg";
3-
import svelteLogo from "./assets/svelte.svg";
42
import Counter from "./lib/Counter.svelte";
53
</script>
64

7-
<main>
8-
<div>
9-
<a href="https://vitejs.dev" target="_blank">
10-
<img src={viteLogo} class="logo" alt="Vite Logo" />
11-
</a>
12-
<a href="https://svelte.dev" target="_blank">
13-
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
14-
</a>
15-
</div>
16-
<h1>Vite + Svelte</h1>
5+
<h1 class="text-2xl font-bold">Counter</h1>
176

18-
<div class="card">
19-
<Counter />
20-
</div>
7+
<Counter />
218

22-
<p>
23-
Check out <a href="https://github.com/sveltejs/kit#readme" target="_blank"
24-
>SvelteKit</a
25-
>, the official Svelte app framework powered by Vite!
26-
</p>
27-
28-
<p class="read-the-docs">Click on the Vite and Svelte logos to learn more</p>
29-
</main>
30-
31-
<style>
32-
.logo {
33-
height: 6em;
34-
padding: 1.5em;
35-
will-change: filter;
36-
}
37-
.logo:hover {
38-
filter: drop-shadow(0 0 2em #646cffaa);
39-
}
40-
.logo.svelte:hover {
41-
filter: drop-shadow(0 0 2em #ff3e00aa);
42-
}
43-
.read-the-docs {
44-
color: #888;
9+
<style lang="postcss">
10+
h1 {
11+
@apply hover:underline;
4512
}
4613
</style>

frontend/src/app.css

+3-81
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,3 @@
1-
:root {
2-
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
3-
font-size: 16px;
4-
line-height: 24px;
5-
font-weight: 400;
6-
7-
color-scheme: light dark;
8-
color: rgba(255, 255, 255, 0.87);
9-
background-color: #242424;
10-
11-
font-synthesis: none;
12-
text-rendering: optimizeLegibility;
13-
-webkit-font-smoothing: antialiased;
14-
-moz-osx-font-smoothing: grayscale;
15-
-webkit-text-size-adjust: 100%;
16-
}
17-
18-
a {
19-
font-weight: 500;
20-
color: #646cff;
21-
text-decoration: inherit;
22-
}
23-
a:hover {
24-
color: #535bf2;
25-
}
26-
27-
body {
28-
margin: 0;
29-
display: flex;
30-
place-items: center;
31-
min-width: 320px;
32-
min-height: 100vh;
33-
}
34-
35-
h1 {
36-
font-size: 3.2em;
37-
line-height: 1.1;
38-
}
39-
40-
.card {
41-
padding: 2em;
42-
}
43-
44-
#app {
45-
max-width: 1280px;
46-
margin: 0 auto;
47-
padding: 2rem;
48-
text-align: center;
49-
}
50-
51-
button {
52-
border-radius: 8px;
53-
border: 1px solid transparent;
54-
padding: 0.6em 1.2em;
55-
font-size: 1em;
56-
font-weight: 500;
57-
font-family: inherit;
58-
background-color: #1a1a1a;
59-
cursor: pointer;
60-
transition: border-color 0.25s;
61-
}
62-
button:hover {
63-
border-color: #646cff;
64-
}
65-
button:focus,
66-
button:focus-visible {
67-
outline: 4px auto -webkit-focus-ring-color;
68-
}
69-
70-
@media (prefers-color-scheme: light) {
71-
:root {
72-
color: #213547;
73-
background-color: #ffffff;
74-
}
75-
a:hover {
76-
color: #747bff;
77-
}
78-
button {
79-
background-color: #f9f9f9;
80-
}
81-
}
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

frontend/src/assets/svelte.svg

-1
This file was deleted.

frontend/src/assets/vite.svg

-1
This file was deleted.

frontend/svelte.config.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import sveltePreprocess from "svelte-preprocess";
1+
import preprocess from "svelte-preprocess";
22

33
export default {
4-
// Consult https://github.com/sveltejs/svelte-preprocess
5-
// for more information about preprocessors
6-
preprocess: sveltePreprocess(),
4+
preprocess: preprocess({ postcss: true }),
75
};

0 commit comments

Comments
 (0)