Skip to content

Commit

Permalink
font juggling (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
gularsson authored Dec 8, 2023
1 parent 02a8d3c commit bd6255c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ export default {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
},
autoprefixer: {}
}
}
4 changes: 2 additions & 2 deletions src/components/ui/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
className={cn('[&_tr:last-child]:border-0', className)}
className={cn('[&_tr:first-child]:border-0', className)}
{...props}
/>
))
Expand All @@ -55,7 +55,7 @@ React.HTMLAttributes<HTMLTableRowElement>
<tr
ref={ref}
className={cn(
'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
'border-y transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
className
)}
{...props}
Expand Down
9 changes: 9 additions & 0 deletions src/styles/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* inter-latin-400-normal */
@font-face {
font-family: 'Inter';
font-style: normal;
font-display: swap;
font-weight: 400;
src: url(../inter-latin-400-normal.woff2) format('woff2'), url(../inter-latin-400-normal.woff) format('woff');
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
2 changes: 1 addition & 1 deletion src/styles/layout-base.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@fontsource/inter';
@import "./inter.css";

@layer base {
:root {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"include": [
"./src/**/*",
"postcss.config.js",
"tailwind.config.ts",
"vite.config.ts"
]
Expand Down
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export default defineConfig({
{
src: './src/styles/preset.ts',
dest: './styles'
},
{
src: './src/styles/inter.css',
dest: './styles'
},
{
src: 'node_modules/@fontsource/inter/files/inter-latin-400-normal.{woff,woff2}',
dest: './styles'
}
]
})
Expand Down

0 comments on commit bd6255c

Please sign in to comment.