Skip to content

Commit

Permalink
feat(ui): Refactor UI view and switch styles to shadcn ui.
Browse files Browse the repository at this point in the history
  • Loading branch information
syfxlin committed Jan 20, 2025
1 parent 5e04f64 commit 5c99c51
Showing 1 changed file with 6 additions and 40 deletions.
46 changes: 6 additions & 40 deletions src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,6 @@
@import (inline) "tippy.js/dist/tippy.css";
@import (inline) "tippy.js/animations/shift-away.css";

:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 221.2 83.2% 53.3%;
--primary-foreground: 210 40% 98%;
--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;
--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;
--destructive: 0 72.22% 50.59%;
--destructive-foreground: 0 0% 98%;
--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 5% 64.9%;
--radius: 0.5rem;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--sidebar-background: 0 0% 98%;
--sidebar-foreground: 240 5.3% 26.1%;
--sidebar-primary: 240 5.9% 10%;
--sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 240 4.8% 95.9%;
--sidebar-accent-foreground: 240 5.9% 10%;
--sidebar-border: 220 13% 91%;
--sidebar-ring: 240 5% 64.9%
}

:root {
// font
--tiptap-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
Expand All @@ -57,12 +21,14 @@
--tiptap-selected: hsla(207, 100%, 50%, 0.05);
--tiptap-foreground: hsl(var(--foreground, 240 10% 3.9%));
--tiptap-background: hsl(var(--background, 0 0% 100%));
--tiptap-primary-foreground: hsl(var(--primary-foreground, 0 0% 98%));
--tiptap-primary-background: hsl(var(--primary, 240 5.9% 10%));
--tiptap-primary-foreground: hsl(var(--primary-foreground, 210 40% 98%));
--tiptap-primary-background: hsl(var(--primary, 221.2 83.2% 53.3%));
--tiptap-muted-foreground: hsl(var(--muted-foreground, 240 3.8% 46.1%));
--tiptap-muted-background: hsl(var(--muted, 240 4.8% 95.9%));
--tiptap-accent-foreground: hsl(var(--accent-foreground, 240 5.9% 10%));
--tiptap-accent-background: hsl(var(--accent, 240 4.8% 95.9%));
--tiptap-card-foreground: hsl(var(--accent-foreground, 240 5.9% 10%));
--tiptap-card-background: hsl(var(--accent, 240 4.8% 95.9%) / 20%);
--tiptap-popover-foreground: hsl(var(--popover-foreground, 240 10% 3.9%));
--tiptap-popover-background: hsl(var(--popover, 0 0% 100%));
--tiptap-info-foreground: hsl(220, 6%, 40%);
Expand Down Expand Up @@ -1254,7 +1220,7 @@
gap: 0.5em;
border-radius: var(--tiptap-radius);
border: 1px solid var(--tiptap-border);
background-color: var(--tiptap-muted-background);
background-color: var(--tiptap-card-background);

// toolbar
[data-type="codeBlockToolbar"] {
Expand Down Expand Up @@ -1538,7 +1504,7 @@

&-editor {
padding: 0.75em 1em;
background-color: var(--tiptap-muted-background);
background-color: var(--tiptap-card-background);
border-top-left-radius: var(--tiptap-radius);
border-top-right-radius: var(--tiptap-radius);
border-bottom: 1px solid var(--tiptap-border);
Expand Down

0 comments on commit 5c99c51

Please sign in to comment.