Skip to content

Commit

Permalink
Tweak styles
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis committed Dec 26, 2024
1 parent d63114c commit 2b8055b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function CalendarItem({
<span className="hidden @[3rem]:inline">{name}</span>
<span
className={cx(
isToday && "-mx-1 -my-[0.125rem] rounded px-1 py-[0.125rem]",
isToday && "-mx-1 -my-[0.125rem] rounded-sm px-1 py-[0.125rem]",
// Outline the current day
isToday && !isActive && "shadow-[inset_0_0_0_1px_currentColor]",
// Make outline bolder if current day is active
Expand Down
2 changes: 1 addition & 1 deletion src/components/github-avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function GitHubAvatar({ login, size = 32, className, style, ...props }: G
<div
aria-hidden
className={cx(
"inline-block size-icon flex-shrink-0 rounded-full bg-[white] bg-cover ring-1 ring-inset ring-border-secondary 2x:ring-[0.5px]",
"inline-block size-icon flex-shrink-0 rounded-full bg-[white] bg-cover ring-1 ring-inset ring-border-secondary",
className,
)}
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function MarkdownContent({ children, className }: { children: string; className?
function BookCover({ isbn }: { isbn: string }) {
return (
<a
className="focus-ring inline-block aspect-[2/3] h-20 rounded-sm bg-bg-secondary bg-cover bg-center shadow-sm ring-1 ring-inset ring-border-secondary transition-[box-shadow] hover:shadow-md 2x:ring-[0.5px]"
className="focus-ring inline-block aspect-[2/3] h-20 rounded-sm bg-bg-secondary bg-cover bg-center shadow-sm ring-1 ring-inset ring-border-secondary transition-[box-shadow] hover:shadow-md"
href={`https://openlibrary.org/isbn/${isbn}`}
target="_blank"
rel="noopener noreferrer"
Expand Down
2 changes: 1 addition & 1 deletion src/components/note-favicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const NoteFavicon = React.memo(
icon = (
<div
data-testid="favicon-isbn"
className="focus-ring inline-block aspect-[3/4] h-icon rounded-[2px] bg-bg-secondary bg-cover bg-center shadow-sm ring-1 ring-inset ring-border-secondary 2x:ring-[0.5px]"
className="focus-ring inline-block aspect-[3/4] h-icon rounded-[2px] bg-bg-secondary bg-cover bg-center shadow-sm ring-1 ring-inset ring-border-secondary"
style={{
backgroundImage: `url(https://covers.openlibrary.org/b/isbn/${note.frontmatter.isbn}-S.jpg)`,
}}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ body:has([data-resizing="true"]) * {
/* Card */

.card {
@apply rounded-lg border-0 ring-1 ring-border-secondary 2x:ring-[0.5px] dark:ring-inset;
@apply rounded-lg border-0 ring-1 ring-border-secondary dark:ring-inset;
}

.card-1 {
Expand Down
15 changes: 11 additions & 4 deletions src/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
--font-weight-bold: 550;

/* Border radii */
--border-radius-sm: 6px; /* base - 2px */
--border-radius-base: 8px; /* base */
--border-radius-lg: 12px; /* base + 4px */
--border-radius-xl: 16px; /* base + 8px */
--border-radius-sm: 4px; /* base - 2px */
--border-radius-base: 6px; /* base */
--border-radius-lg: 8px; /* base + 4px */
--border-radius-xl: 12px; /* base + 8px */
--border-radius-full: 9999px;

/* Icons */
Expand Down Expand Up @@ -116,6 +116,13 @@
--font-weight-normal: 450;
--font-weight-bold: 600;

/* Border radii */
--border-radius-sm: 6px; /* base - 2px */
--border-radius-base: 8px; /* base */
--border-radius-lg: 12px; /* base + 4px */
--border-radius-xl: 16px; /* base + 8px */
--border-radius-full: 9999px;

/* Icons */
--icon-size: 20px;
}
Expand Down

0 comments on commit 2b8055b

Please sign in to comment.