Skip to content

Commit

Permalink
Fix styling for tailwind v4
Browse files Browse the repository at this point in the history
  • Loading branch information
kungpaogao committed Feb 18, 2025
1 parent fa122ac commit 0b6ca41
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const Navigation: Component<NavigationProps> = ({
<div
class={clsx(
"absolute top-0 left-0 right-0 bottom-0 h-[100vh]",
"bg-black/0 backdrop-blur-sm",
"bg-black/0 backdrop-blur-xs",
"transition-opacity",
"hidden md:hidden",
"peer-target:block peer-checked:block",
Expand Down
2 changes: 2 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@config "../../tailwind.config.cjs";

html {
background-color: theme("colors.stone.100");
Expand Down
8 changes: 4 additions & 4 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
},
// https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js
// https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js
typography: (theme) => ({
typography: ({theme}) => ({
DEFAULT: {
css: {
p: {
Expand All @@ -42,7 +42,7 @@ module.exports = {
margin: "6.5px 0px",
},
h1: {
fontFamily: theme("fontFamily.serif").join(","),
fontFamily: theme("fontFamily.serif"), //.join(","),
fontSize: "1.875em",
fontWeight: theme("fontWeight.medium"),
lineHeight: headingLineHeight,
Expand All @@ -51,7 +51,7 @@ module.exports = {
padding: textPadding,
},
h2: {
fontFamily: theme("fontFamily.serif").join(","),
fontFamily: theme("fontFamily.serif"), //.join(","),
fontSize: "1.5em",
fontWeight: theme("fontWeight.medium"),
lineHeight: headingLineHeight,
Expand All @@ -60,7 +60,7 @@ module.exports = {
padding: textPadding,
},
h3: {
fontFamily: theme("fontFamily.serif").join(","),
fontFamily: theme("fontFamily.serif"), //.join(","),
fontSize: "1.25em",
fontWeight: theme("fontWeight.medium"),
lineHeight: headingLineHeight,
Expand Down

0 comments on commit 0b6ca41

Please sign in to comment.