Skip to content

Commit 33fccfe

Browse files
committed
refactor: Replace custom size classes with Tailwind CSS 4 standard classes
- Update all custom size classes to use standard Tailwind CSS 4 classes
1 parent 02008fd commit 33fccfe

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/components/ImageViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ export function ImageViewer({
629629
)}
630630

631631
<div className="absolute bottom-4 left-0 right-0 flex flex-col items-center gap-2 z-50 px-4">
632-
<div className="hidden sm:flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm min-h-[1.5rem]">
632+
<div className="hidden sm:flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm min-h-6">
633633
{imageMetadata ? (
634634
<>
635635
<span className="opacity-80">
@@ -705,7 +705,7 @@ export function ImageViewer({
705705
</Button>
706706
</div>
707707
<div className="flex flex-col items-center gap-2 sm:hidden w-full">
708-
<div className="flex items-center justify-center gap-2 rounded-md px-3 py-1.5 text-md min-h-[1.75rem] w-full">
708+
<div className="flex items-center justify-center gap-2 rounded-md px-3 py-1.5 text-base min-h-7 w-full">
709709
{imageMetadata ? (
710710
<>
711711
<span className="opacity-80">

src/components/SettingButton.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function SettingButton() {
139139
</a>
140140
</Label>
141141
{rateLimit.limit ? (
142-
<div className="text-[0.65rem] text-accent">
142+
<div className="text-xs text-accent">
143143
rate limit:&nbsp;
144144
<span className="font-mono">
145145
{rateLimit.remaining || '-'} / {rateLimit.limit || '-'}
@@ -154,7 +154,7 @@ export function SettingButton() {
154154
placeholder="github_pat_1234567890"
155155
className="h-9 text-xs"
156156
/>
157-
<p className="text-[0.7rem] text-muted-foreground">
157+
<p className="text-xs text-muted-foreground">
158158
Used to increase GitHub API rate limits and access private
159159
repositories.
160160
</p>
@@ -167,7 +167,7 @@ export function SettingButton() {
167167
<Label className="text-xs font-medium uppercase tracking-[0.14em] text-foreground">
168168
Columns in grid
169169
</Label>
170-
<span className="text-[0.7rem] text-accent">
170+
<span className="text-xs text-accent">
171171
{columnCount ? `${columnCount} columns` : 'auto'}
172172
</span>
173173
</div>
@@ -179,7 +179,7 @@ export function SettingButton() {
179179
value={[columnCount]}
180180
onValueChange={value => setColumnCount(value[0])}
181181
/>
182-
<p className="text-[0.7rem] text-muted-foreground">
182+
<p className="text-xs text-muted-foreground">
183183
Set to <span className="font-mono text-accent">0</span> to
184184
automatically fit the screen width.
185185
</p>
@@ -209,7 +209,7 @@ export function SettingButton() {
209209
<span className="text-xs whitespace-nowrap">Dark</span>
210210
</Button>
211211
</div>
212-
<p className="text-[0.7rem] text-muted-foreground">
212+
<p className="text-xs text-muted-foreground">
213213
Choose your preferred color theme.
214214
</p>
215215
</div>
@@ -225,7 +225,7 @@ export function SettingButton() {
225225
size="sm"
226226
className="gap-1.5 justify-start"
227227
onClick={() => setGridBackground('auto')}>
228-
<div className="h-4 w-4 rounded border border-border shrink-0 flex items-center justify-center text-[0.65rem] font-semibold">
228+
<div className="h-4 w-4 rounded border border-border shrink-0 flex items-center justify-center text-xs font-semibold">
229229
A
230230
</div>
231231
<span className="text-xs">Auto</span>
@@ -260,7 +260,7 @@ export function SettingButton() {
260260
<span className="text-xs">Black</span>
261261
</Button>
262262
</div>
263-
<p className="text-[0.7rem] text-muted-foreground">
263+
<p className="text-xs text-muted-foreground">
264264
Background color for the image grid.
265265
</p>
266266
</div>
@@ -278,7 +278,7 @@ export function SettingButton() {
278278
onCheckedChange={setPixelated}
279279
/>
280280
</div>
281-
<p className="text-[0.7rem] text-muted-foreground">
281+
<p className="text-xs text-muted-foreground">
282282
Render images with crisp pixels, ideal for pixel-art textures.
283283
</p>
284284
</div>
@@ -298,14 +298,14 @@ export function SettingButton() {
298298
onCheckedChange={setAnimationEnabled}
299299
/>
300300
</div>
301-
<p className="text-[0.7rem] text-muted-foreground">
301+
<p className="text-xs text-muted-foreground">
302302
Play Minecraft-style animations for textures that include a
303303
corresponding{' '}
304304
<span className="font-mono text-accent">.mcmeta</span> file.
305305
</p>
306306
</div>
307307

308-
<p className="pt-1 text-[0.65rem] text-muted-foreground/80">
308+
<p className="pt-1 text-xs text-muted-foreground/80">
309309
Changes are applied per browser and do not affect the underlying
310310
repositories.
311311
</p>

src/components/ui/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
88
type={type}
99
data-slot="input"
1010
className={cn(
11-
"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground aria-invalid:outline-destructive/60 aria-invalid:ring-destructive/20 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/40 aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-4 focus-visible:outline-1 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:focus-visible:ring-[0.1875rem] aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-4",
11+
"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground aria-invalid:outline-destructive/60 aria-invalid:ring-destructive/20 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/50 ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 aria-invalid:outline-destructive/60 dark:aria-invalid:outline-destructive dark:aria-invalid:ring-destructive/40 aria-invalid:ring-destructive/20 aria-invalid:border-destructive/60 dark:aria-invalid:border-destructive flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-4 focus-visible:outline-1 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:focus-visible:ring-1 aria-invalid:focus-visible:outline-none md:text-sm dark:aria-invalid:focus-visible:ring-4",
1212
className
1313
)}
1414
{...props}

src/components/ui/switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Switch({
1111
<SwitchPrimitive.Root
1212
data-slot="switch"
1313
className={cn(
14-
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[0.1875rem] disabled:cursor-not-allowed disabled:opacity-50",
14+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-5 w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
1515
className
1616
)}
1717
{...props}

src/components/ui/tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function TooltipContent({
5050
{...props}
5151
>
5252
{children}
53-
<TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_0.125rem)] rotate-45 rounded-[0.125rem]" />
53+
<TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_0.125rem)] rotate-45 rounded-sm" />
5454
</TooltipPrimitive.Content>
5555
</TooltipPrimitive.Portal>
5656
)

src/pages/Home.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ export default function Home() {
8181
</div>
8282
<p className="mt-2 text-xs text-muted-foreground sm:text-sm">
8383
Example:{' '}
84-
<span className="font-mono text-[0.7rem] text-accent sm:text-xs">
84+
<span className="font-mono text-xs text-accent">
8585
https://github.com/owner/repo
8686
</span>
8787
</p>
8888
</div>
8989

90-
<div className="flex items-center gap-3 text-[0.65rem] uppercase tracking-[0.2em] text-muted-foreground">
90+
<div className="flex items-center gap-3 text-xs uppercase tracking-[0.2em] text-muted-foreground">
9191
<div className="h-px flex-1 bg-border/60" />
9292
<span>OR</span>
9393
<div className="h-px flex-1 bg-border/60" />
@@ -125,7 +125,7 @@ export default function Home() {
125125
role="listitem"
126126
variant="outline"
127127
size="sm"
128-
className="flex h-9 items-center justify-start overflow-hidden text-ellipsis whitespace-nowrap border-border/60 bg-background/40 text-[0.7rem] font-normal text-muted-foreground hover:bg-accent/20 hover:text-foreground sm:text-xs"
128+
className="flex h-9 items-center justify-start overflow-hidden text-ellipsis whitespace-nowrap border-border/60 bg-background/40 text-xs font-normal text-muted-foreground hover:bg-accent/20 hover:text-foreground"
129129
onClick={() => setTargetRepository(owner, name, ref)}
130130
aria-label={`Open example repository ${owner}/${name}`}>
131131
<span className="font-mono">

src/pages/RepoView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default function RepoView() {
163163
<FilterInput />
164164
</div>
165165

166-
<div className="mt-1 flex items-center justify-between gap-2 text-[0.7rem] text-muted-foreground sm:order-1 sm:mt-0 sm:flex-1 sm:justify-start sm:text-xs">
166+
<div className="mt-1 flex items-center justify-between gap-2 text-xs text-muted-foreground sm:order-1 sm:mt-0 sm:flex-1 sm:justify-start">
167167
<span className="rounded-full bg-background/70 px-2 py-1">
168168
Showing{' '}
169169
<span className="font-semibold text-accent">
@@ -178,7 +178,7 @@ export default function RepoView() {
178178
onClick={downloadAll}
179179
size="sm"
180180
variant="outline"
181-
className="text-[0.7rem] font-semibold sm:text-xs">
181+
className="text-xs font-semibold">
182182
{isDownloading ? (
183183
<>
184184
<LoaderIcon className="size-4 animate-spin" />

0 commit comments

Comments
 (0)