refactor: update tailwind classes to v3 syntax (#345)

Updated background/border opacity to the new syntax:
- border-skin-fill border-opacity-40 => border-skin-fill/40
- selection:bg-skin-accent selection:bg-opacity-70 => selection:bg-skin-accent/70
This commit is contained in:
Sat Naing
2024-08-04 10:49:13 +07:00
committed by GitHub
parent 910b72e513
commit be172efa17
2 changed files with 7 additions and 32 deletions
+3 -6
View File
@@ -1,5 +1,5 @@
import Fuse from "fuse.js"; import Fuse from "fuse.js";
import { useEffect, useRef, useState, useMemo } from "react"; import { useEffect, useRef, useState, useMemo, type FormEvent } from "react";
import Card from "@components/Card"; import Card from "@components/Card";
import type { CollectionEntry } from "astro:content"; import type { CollectionEntry } from "astro:content";
@@ -26,7 +26,7 @@ export default function SearchBar({ searchList }: Props) {
null null
); );
const handleChange = (e: React.FormEvent<HTMLInputElement>) => { const handleChange = (e: FormEvent<HTMLInputElement>) => {
setInputVal(e.currentTarget.value); setInputVal(e.currentTarget.value);
}; };
@@ -83,10 +83,7 @@ export default function SearchBar({ searchList }: Props) {
<span className="sr-only">Search</span> <span className="sr-only">Search</span>
</span> </span>
<input <input
className="block w-full rounded border border-skin-fill className="block w-full rounded border border-skin-fill/40 bg-skin-fill py-3 pl-10 pr-3 placeholder:italic focus:border-skin-accent focus:outline-none"
border-opacity-40 bg-skin-fill py-3 pl-10
pr-3 placeholder:italic placeholder:text-opacity-75
focus:border-skin-accent focus:outline-none"
placeholder="Search for anything..." placeholder="Search for anything..."
type="text" type="text"
name="search" name="search"
+4 -26
View File
@@ -29,45 +29,23 @@
display: block; display: block;
} }
body { body {
@apply flex min-h-[100svh] flex-col bg-skin-fill font-mono text-skin-base @apply flex min-h-[100svh] flex-col bg-skin-fill font-mono text-skin-base selection:bg-skin-accent/70 selection:text-skin-inverted;
selection:bg-skin-accent selection:bg-opacity-70 selection:text-skin-inverted;
} }
section, section,
footer { footer {
@apply mx-auto max-w-3xl px-4; @apply mx-auto max-w-3xl px-4;
} }
a { a {
@apply outline-2 outline-offset-1 outline-skin-fill @apply outline-2 outline-offset-1 outline-skin-fill focus-visible:no-underline focus-visible:outline-dashed;
focus-visible:no-underline focus-visible:outline-dashed;
} }
svg { svg {
@apply inline-block h-6 w-6 fill-skin-base group-hover:fill-skin-accent; @apply inline-block h-6 w-6 fill-skin-base group-hover:fill-skin-accent;
} }
svg.icon-tabler { svg.icon-tabler {
@apply inline-block h-6 w-6 scale-125 fill-transparent @apply inline-block h-6 w-6 scale-125 fill-transparent stroke-current stroke-2 opacity-90 group-hover:fill-transparent sm:scale-110;
stroke-current stroke-2 opacity-90 group-hover:fill-transparent
sm:scale-110;
} }
.prose { .prose {
@apply prose-headings:!mb-3 prose-headings:!text-skin-base @apply prose-headings:!mb-3 prose-headings:!text-skin-base prose-h3:italic prose-p:!text-skin-base prose-a:!text-skin-base prose-a:!decoration-dashed prose-a:underline-offset-8 hover:prose-a:text-skin-accent prose-blockquote:!border-l-skin-accent/50 prose-blockquote:opacity-80 prose-figcaption:!text-skin-base prose-figcaption:opacity-70 prose-strong:!text-skin-base prose-code:rounded prose-code:bg-skin-card/75 prose-code:p-1 prose-code:before:!content-none prose-code:after:!content-none prose-ol:!text-skin-base prose-ul:overflow-x-clip prose-ul:!text-skin-base prose-li:marker:!text-skin-accent prose-table:text-skin-base prose-th:border prose-th:border-skin-line prose-td:border prose-td:border-skin-line prose-img:!my-2 prose-img:mx-auto prose-img:border-2 prose-img:border-skin-line prose-hr:!border-skin-line;
prose-h3:italic prose-p:!text-skin-base
prose-a:!text-skin-base prose-a:!decoration-dashed prose-a:underline-offset-8
hover:prose-a:text-skin-accent prose-blockquote:!border-l-skin-accent
prose-blockquote:border-opacity-50 prose-blockquote:opacity-80
prose-figcaption:!text-skin-base prose-figcaption:opacity-70
prose-strong:!text-skin-base
prose-code:rounded prose-code:bg-skin-card
prose-code:bg-opacity-75 prose-code:p-1
prose-code:before:!content-none prose-code:after:!content-none
prose-ol:!text-skin-base
prose-ul:overflow-x-clip prose-ul:!text-skin-base prose-li:marker:!text-skin-accent
prose-table:text-skin-base prose-th:border
prose-th:border-skin-line prose-td:border
prose-td:border-skin-line prose-img:!my-2
prose-img:mx-auto prose-img:border-2
prose-img:border-skin-line prose-hr:!border-skin-line;
} }
.prose a { .prose a {
@apply break-words hover:!text-skin-accent; @apply break-words hover:!text-skin-accent;