-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: improved plugin options (#11)
* feat: allow gray override and custom colors * tweak: new size scale for display typography * feat!: improved plugin options
- Loading branch information
1 parent
dcaf3e0
commit 8dddd74
Showing
5 changed files
with
129 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const spacing = { | ||
4.5: "1.125.rem", | ||
}; | ||
|
||
module.exports = { | ||
spacing, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,71 @@ | ||
const { fontSize } = require("tailwindcss/defaultTheme"); | ||
|
||
module.exports = { | ||
...["sm", "base", "lg"].reduce( | ||
(object, size) => ({ | ||
...object, | ||
[size]: fontSize[size], | ||
}), | ||
{} | ||
), | ||
xs: [ | ||
"0.75rem", | ||
{ | ||
lineHeight: "1.125rem", | ||
}, | ||
], | ||
sm: [ | ||
"0.875rem", | ||
{ | ||
lineHeight: "1.5rem", | ||
}, | ||
], | ||
md: fontSize.base, | ||
const customHeadingFontSizes = { | ||
"h-xs": [ | ||
"1.25rem", | ||
{ | ||
lineHeight: "1.75rem", | ||
}, | ||
], | ||
"h-sm": [ | ||
"1.5rem", | ||
{ | ||
lineHeight: "2rem", | ||
}, | ||
], | ||
"h-md": [ | ||
"h-sm": [ | ||
"1.875rem", | ||
{ | ||
lineHeight: "2.375rem", | ||
}, | ||
], | ||
"h-lg": [ | ||
"h-md": [ | ||
"2.25rem", | ||
{ | ||
letterSpacing: "-0.02em", | ||
lineHeight: "2.75rem", | ||
}, | ||
], | ||
"h-xl": [ | ||
"h-lg": [ | ||
"3rem", | ||
{ | ||
letterSpacing: "-0.02em", | ||
lineHeight: "3.75rem", | ||
}, | ||
], | ||
"h-2xl": [ | ||
"h-xl": [ | ||
"3.75rem", | ||
{ | ||
letterSpacing: "-0.02em", | ||
lineHeight: "4.5rem", | ||
}, | ||
], | ||
"h-2xl": [ | ||
"4.5rem", | ||
{ | ||
letterSpacing: "-0.02em", | ||
lineHeight: "5.625rem", | ||
}, | ||
], | ||
}; | ||
|
||
const customStandardFontSizes = { | ||
xs: [ | ||
"0.75rem", | ||
{ | ||
lineHeight: "1.125rem", | ||
}, | ||
], | ||
sm: [ | ||
"0.875rem", | ||
{ | ||
lineHeight: "1.5rem", | ||
}, | ||
], | ||
md: fontSize.base, | ||
}; | ||
|
||
module.exports = { | ||
...["sm", "base", "lg"].reduce( | ||
(object, size) => ({ | ||
...object, | ||
[size]: fontSize[size], | ||
}), | ||
{} | ||
), | ||
...customStandardFontSizes, | ||
...customHeadingFontSizes, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters