Skip to content

Commit 73b5ecf

Browse files
committed
refactor(formi): replace unocss with tailwind
1 parent e95f608 commit 73b5ecf

33 files changed

+313
-1001
lines changed

.changeset/empty-foxes-create.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'd3-graph-controller': patch
3+
---
4+
5+
improve style export config

.oxfmtrc.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,32 @@
55
"sortImports": {},
66
"sortPackageJson": {
77
"sortScripts": true
8-
}
8+
},
9+
"overrides": [
10+
{
11+
"files": ["apps/formi/**/*.{ts,vue}"],
12+
"options": {
13+
"sortTailwindcss": {
14+
"stylesheet": "apps/formi/assets/css/main.css"
15+
}
16+
}
17+
},
18+
{
19+
"files": ["apps/wiener-time/**/*.{ts,tsx}"],
20+
"options": {
21+
"sortTailwindcss": {
22+
"stylesheet": "apps/wiener-time/src/styles/globals.css"
23+
}
24+
}
25+
},
26+
{
27+
"files": ["packages/turbo-graph-ui/**/*.{ts,tsx}"],
28+
"options": {
29+
"sortTailwindcss": {
30+
"stylesheet": "packages/turbo-graph-ui/app/globals.css",
31+
"functions": ["cn"]
32+
}
33+
}
34+
}
35+
]
936
}

apps/formi/assets/css/main.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import 'tailwindcss';
12
@import 'd3-graph-controller/default.css';
23
@import 'vue-toastification/dist/index.css';
34

@@ -17,6 +18,10 @@ body,
1718
overflow-y: auto;
1819
}
1920

21+
.font-ui {
22+
font-family: 'Readex Pro', ui-sans-serif, system-ui, sans-serif;
23+
}
24+
2025
:root {
2126
--green: #22c55e;
2227
--splitpanes-border-color: #57534e;

apps/formi/components/CircledNumber.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const { number } = toRefs(props)
55

66
<template>
77
<div
8-
class="border-1 rounded-10 w-1.25em h-1.25em font-200 flex select-none items-center justify-center border-stone-900"
8+
class="flex h-[1.25em] w-[1.25em] items-center justify-center rounded-full border border-stone-900 font-extralight select-none"
99
>
10-
<span class="text-0.875em">
10+
<span class="text-[0.875em]">
1111
{{ number }}
1212
</span>
1313
</div>

apps/formi/components/DemoCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
data-testid="demo-card"
4-
class="border-1 overflow-hidden rounded border-stone-400 bg-white shadow-xl"
4+
class="overflow-hidden rounded border border-stone-400 bg-white shadow-xl"
55
>
66
<slot />
77
</div>

apps/formi/components/FOLTree.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const borderBreakpoints = [1, 3, 5] as const
1717
<template>
1818
<div
1919
:data-testid="level === 0 ? 'fol-tree' : undefined"
20-
class="bg-op-25 border-1 flex size-fit flex-col items-center justify-center rounded bg-stone-900 p-2 text-stone-100 shadow"
20+
class="flex size-fit flex-col items-center justify-center rounded border bg-stone-900/25 p-2 text-stone-100 shadow"
2121
:class="{
2222
'border-stone-600': level < borderBreakpoints[0],
2323
'border-stone-700': level >= borderBreakpoints[0],
@@ -26,7 +26,7 @@ const borderBreakpoints = [1, 3, 5] as const
2626
}"
2727
>
2828
<code
29-
class="select-none px-1"
29+
class="px-1 select-none"
3030
:class="{ 'cursor-pointer': children.length > 0 }"
3131
style="white-space: nowrap"
3232
@click="expanded = !expanded"

apps/formi/components/FeatureParagraph.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
data-testid="feature-paragraph"
4-
class="children:max-w-128 children:text-center my-16 flex flex-col justify-center text-stone-600"
4+
class="my-16 flex flex-col justify-center text-stone-600 [&>*]:max-w-[32rem] [&>*]:text-center"
55
>
66
<slot />
77
</div>

apps/formi/components/Footer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ const resources: Link[] = [
2222
</script>
2323

2424
<template>
25-
<footer class="align-start mx-auto mt-8 flex w-fit flex-wrap justify-between gap-12">
25+
<footer class="mx-auto mt-8 flex w-fit flex-wrap items-start justify-between gap-12">
2626
<FooterColumn title="Resources">
2727
<a
2828
v-for="link of resources"
2929
:key="link.to"
3030
target="_blank"
3131
rel="noreferrer"
3232
:href="link.to"
33-
class="my--2 w-full cursor-pointer py-2 transition-colors hover:text-stone-900"
33+
class="-my-2 w-full cursor-pointer py-2 transition-colors hover:text-stone-900"
3434
>
3535
{{ link.text }}
3636
</a>

apps/formi/components/FooterColumn.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const { title } = toRefs(props)
44
</script>
55

66
<template>
7-
<div class="font-300 flex flex-col gap-2 text-sm text-stone-600">
8-
<span class="font-400 mb-4 text-stone-900">{{ title }}</span>
7+
<div class="flex flex-col gap-2 text-sm font-light text-stone-600">
8+
<span class="mb-4 font-normal text-stone-900">{{ title }}</span>
99
<slot />
1010
</div>
1111
</template>

apps/formi/components/HLine.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<template>
2-
<div class="h-0.1rem flex-1 bg-stone-700" />
2+
<div class="h-[0.1rem] flex-1 bg-stone-700" />
33
</template>

0 commit comments

Comments
 (0)