mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 18:27:36 +00:00
feat: cleanup tw config before upgrade
This commit is contained in:
+12
-236
@@ -1,13 +1,3 @@
|
|||||||
const colors = require("tailwindcss/colors");
|
|
||||||
const round = (num) =>
|
|
||||||
num
|
|
||||||
.toFixed(7)
|
|
||||||
.replace(/(\.[0-9]+?)0+$/, "$1")
|
|
||||||
.replace(/\.0$/, "");
|
|
||||||
const em = (px, base) => `${round(px / base)}em`;
|
|
||||||
|
|
||||||
const plugin = require("tailwindcss/plugin");
|
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
darkMode: "class",
|
darkMode: "class",
|
||||||
@@ -343,234 +333,20 @@ module.exports = {
|
|||||||
"7xl": "5rem",
|
"7xl": "5rem",
|
||||||
"8xl": "6rem",
|
"8xl": "6rem",
|
||||||
"9xl": "7rem"
|
"9xl": "7rem"
|
||||||
},
|
}
|
||||||
typography: (theme) => ({
|
|
||||||
DEFAULT: {
|
|
||||||
css: [
|
|
||||||
{
|
|
||||||
color: "var(--tw-prose-body)",
|
|
||||||
maxWidth: "65ch",
|
|
||||||
'[class~="lead"]': {
|
|
||||||
color: "var(--tw-prose-lead)"
|
|
||||||
},
|
|
||||||
a: {
|
|
||||||
color: colors.gray[200],
|
|
||||||
textDecoration: "underline",
|
|
||||||
fontWeight: "500"
|
|
||||||
},
|
|
||||||
strong: {
|
|
||||||
color: colors.gray[200],
|
|
||||||
fontWeight: "600"
|
|
||||||
},
|
|
||||||
"a strong": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"blockquote strong": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"thead th strong": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
ol: {
|
|
||||||
listStyleType: "decimal"
|
|
||||||
},
|
|
||||||
'ol[type="A"]': {
|
|
||||||
listStyleType: "upper-alpha"
|
|
||||||
},
|
|
||||||
'ol[type="a"]': {
|
|
||||||
listStyleType: "lower-alpha"
|
|
||||||
},
|
|
||||||
'ol[type="A" s]': {
|
|
||||||
listStyleType: "upper-alpha"
|
|
||||||
},
|
|
||||||
'ol[type="a" s]': {
|
|
||||||
listStyleType: "lower-alpha"
|
|
||||||
},
|
|
||||||
'ol[type="I"]': {
|
|
||||||
listStyleType: "upper-roman"
|
|
||||||
},
|
|
||||||
'ol[type="i"]': {
|
|
||||||
listStyleType: "lower-roman"
|
|
||||||
},
|
|
||||||
'ol[type="I" s]': {
|
|
||||||
listStyleType: "upper-roman"
|
|
||||||
},
|
|
||||||
'ol[type="i" s]': {
|
|
||||||
listStyleType: "lower-roman"
|
|
||||||
},
|
|
||||||
'ol[type="1"]': {
|
|
||||||
listStyleType: "decimal"
|
|
||||||
},
|
|
||||||
ul: {
|
|
||||||
listStyleType: "disc"
|
|
||||||
},
|
|
||||||
"ol > li::marker": {
|
|
||||||
fontWeight: "400",
|
|
||||||
color: "var(--tw-prose-counters)"
|
|
||||||
},
|
|
||||||
"ul > li::marker": {
|
|
||||||
color: "var(--tw-prose-bullets)"
|
|
||||||
},
|
|
||||||
hr: {
|
|
||||||
borderColor: "var(--tw-prose-hr)",
|
|
||||||
borderTopWidth: 1
|
|
||||||
},
|
|
||||||
blockquote: {
|
|
||||||
fontWeight: "500",
|
|
||||||
fontStyle: "italic",
|
|
||||||
color: "var(--tw-prose-quotes)",
|
|
||||||
borderLeftWidth: "0.25rem",
|
|
||||||
borderLeftColor: "var(--tw-prose-quote-borders)",
|
|
||||||
quotes: '"\\201C""\\201D""\\2018""\\2019"'
|
|
||||||
},
|
|
||||||
"blockquote p:first-of-type::before": {
|
|
||||||
content: "open-quote"
|
|
||||||
},
|
|
||||||
"blockquote p:last-of-type::after": {
|
|
||||||
content: "close-quote"
|
|
||||||
},
|
|
||||||
h1: {
|
|
||||||
color: colors.gray[200],
|
|
||||||
fontWeight: "800"
|
|
||||||
},
|
|
||||||
"h1 strong": {
|
|
||||||
fontWeight: "900",
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
h2: {
|
|
||||||
color: colors.gray[200],
|
|
||||||
fontWeight: "700"
|
|
||||||
},
|
|
||||||
"h2 strong": {
|
|
||||||
fontWeight: "800",
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
h3: {
|
|
||||||
color: colors.gray[300],
|
|
||||||
fontWeight: "600"
|
|
||||||
},
|
|
||||||
"h3 strong": {
|
|
||||||
fontWeight: "700",
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
h4: {
|
|
||||||
color: colors.gray[400],
|
|
||||||
fontWeight: "600"
|
|
||||||
},
|
|
||||||
"h4 strong": {
|
|
||||||
fontWeight: "700",
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
// TODO: Figure out how to not need these, it's a merging issue
|
|
||||||
img: {},
|
|
||||||
"figure > *": {},
|
|
||||||
figcaption: {
|
|
||||||
color: "var(--tw-prose-captions)"
|
|
||||||
},
|
|
||||||
code: {
|
|
||||||
color: "var(--tw-prose-code)",
|
|
||||||
fontWeight: "600"
|
|
||||||
},
|
|
||||||
"code::before": {
|
|
||||||
content: '"`"'
|
|
||||||
},
|
|
||||||
"code::after": {
|
|
||||||
content: '"`"'
|
|
||||||
},
|
|
||||||
"a code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"h1 code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"h2 code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"h3 code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"h4 code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"blockquote code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
"thead th code": {
|
|
||||||
color: "inherit"
|
|
||||||
},
|
|
||||||
pre: {
|
|
||||||
color: "var(--tw-prose-pre-code)",
|
|
||||||
backgroundColor: colors.gray[800],
|
|
||||||
overflowX: "auto",
|
|
||||||
fontWeight: "400"
|
|
||||||
},
|
|
||||||
"pre code": {
|
|
||||||
backgroundColor: "transparent",
|
|
||||||
borderWidth: "0",
|
|
||||||
borderRadius: "0",
|
|
||||||
padding: "0",
|
|
||||||
fontWeight: "inherit",
|
|
||||||
color: "inherit",
|
|
||||||
fontSize: "inherit",
|
|
||||||
fontFamily: "inherit",
|
|
||||||
lineHeight: "inherit"
|
|
||||||
},
|
|
||||||
"pre code::before": {
|
|
||||||
content: "none"
|
|
||||||
},
|
|
||||||
"pre code::after": {
|
|
||||||
content: "none"
|
|
||||||
},
|
|
||||||
table: {
|
|
||||||
width: "100%",
|
|
||||||
tableLayout: "auto",
|
|
||||||
textAlign: "left",
|
|
||||||
marginTop: em(32, 16),
|
|
||||||
marginBottom: em(32, 16)
|
|
||||||
},
|
|
||||||
thead: {
|
|
||||||
borderBottomWidth: "1px",
|
|
||||||
borderBottomColor: "var(--tw-prose-th-borders)"
|
|
||||||
},
|
|
||||||
"thead th": {
|
|
||||||
color: "var(--tw-prose-headings)",
|
|
||||||
fontWeight: "600",
|
|
||||||
verticalAlign: "bottom"
|
|
||||||
},
|
|
||||||
"tbody tr": {
|
|
||||||
borderBottomWidth: "1px",
|
|
||||||
borderBottomColor: "var(--tw-prose-td-borders)"
|
|
||||||
},
|
|
||||||
"tbody tr:last-child": {
|
|
||||||
borderBottomWidth: "0"
|
|
||||||
},
|
|
||||||
"tbody td": {
|
|
||||||
verticalAlign: "baseline"
|
|
||||||
},
|
|
||||||
tfoot: {
|
|
||||||
borderTopWidth: "1px",
|
|
||||||
borderTopColor: "var(--tw-prose-th-borders)"
|
|
||||||
},
|
|
||||||
"tfoot td": {
|
|
||||||
verticalAlign: "top"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
plugin(function ({ addUtilities }) {
|
// plugin(function ({ addUtilities }) {
|
||||||
addUtilities({
|
// addUtilities({
|
||||||
".no-scrollbar::-webkit-scrollbar": {
|
// ".no-scrollbar::-webkit-scrollbar": {
|
||||||
display: "none"
|
// display: "none"
|
||||||
},
|
// },
|
||||||
".no-scrollbar": {
|
// ".no-scrollbar": {
|
||||||
"-ms-overflow-style": "none",
|
// "-ms-overflow-style": "none",
|
||||||
"scrollbar-width": "none"
|
// "scrollbar-width": "none"
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}),
|
// }),
|
||||||
require("@tailwindcss/typography")
|
require("@tailwindcss/typography")
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user