mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
Merge pull request #1842 from abizek/fix/custom-text-and-background-color
Fix(artboard): Text and background color
This commit is contained in:
@ -20,7 +20,7 @@ export const Page = ({ mode = "preview", pageNumber, children }: Props) => {
|
||||
return (
|
||||
<div
|
||||
data-page={pageNumber}
|
||||
className={cn("relative bg-white", mode === "builder" && "shadow-2xl")}
|
||||
className={cn("relative bg-background text-foreground", mode === "builder" && "shadow-2xl")}
|
||||
style={{
|
||||
fontFamily,
|
||||
width: `${pageSizeMap[page.format].width * MM_TO_PX}px`,
|
||||
|
||||
@ -39,7 +39,7 @@ export const ArtboardPage = () => {
|
||||
`${metadata.typography.lineHeight}`,
|
||||
);
|
||||
|
||||
document.documentElement.style.setProperty("--color-text", metadata.theme.text);
|
||||
document.documentElement.style.setProperty("--color-foreground", metadata.theme.text);
|
||||
document.documentElement.style.setProperty("--color-primary", metadata.theme.primary);
|
||||
document.documentElement.style.setProperty("--color-background", metadata.theme.background);
|
||||
}, [metadata]);
|
||||
|
||||
@ -21,5 +21,5 @@
|
||||
}
|
||||
|
||||
.wysiwyg {
|
||||
@apply prose max-w-none text-current prose-headings:mt-0 prose-headings:mb-2 prose-p:mt-0 prose-p:mb-2 prose-ul:mt-0 prose-ul:mb-2 prose-li:mt-0 prose-li:mb-2 prose-ol:mt-0 prose-ol:mb-2 prose-img:mt-0 prose-img:mb-2 prose-hr:mt-0 prose-hr:mb-2 prose-p:leading-normal prose-li:leading-normal prose-a:break-all;
|
||||
@apply prose max-w-none prose-foreground prose-headings:mt-0 prose-headings:mb-2 prose-p:mt-0 prose-p:mb-2 prose-ul:mt-0 prose-ul:mb-2 prose-li:mt-0 prose-li:mb-2 prose-ol:mt-0 prose-ol:mb-2 prose-img:mt-0 prose-img:mb-2 prose-hr:mt-0 prose-hr:mb-2 prose-p:leading-normal prose-li:leading-normal prose-a:break-all;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ const Header = () => {
|
||||
<p>{basics.headline}</p>
|
||||
</div>
|
||||
|
||||
<div className="text-text col-span-2 col-start-2 mt-10">
|
||||
<div className="col-span-2 col-start-2 mt-10 text-foreground">
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-sm">
|
||||
{basics.location && (
|
||||
<>
|
||||
|
||||
@ -11,7 +11,7 @@ module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
text: "var(--color-text)",
|
||||
foreground: "var(--color-foreground)",
|
||||
primary: "var(--color-primary)",
|
||||
background: "var(--color-background)",
|
||||
},
|
||||
@ -23,6 +23,28 @@ module.exports = {
|
||||
loose: "calc(var(--line-height) + 0.5)",
|
||||
},
|
||||
spacing: { custom: "var(--margin)" },
|
||||
typography: () => ({
|
||||
foreground: {
|
||||
css: {
|
||||
"--tw-prose-body": "var(--color-foreground)",
|
||||
"--tw-prose-headings": "var(--color-foreground)",
|
||||
"--tw-prose-lead": "var(--color-foreground)",
|
||||
"--tw-prose-links": "var(--color-foreground)",
|
||||
"--tw-prose-bold": "var(--color-foreground)",
|
||||
"--tw-prose-counters": "var(--color-foreground)",
|
||||
"--tw-prose-bullets": "var(--color-foreground)",
|
||||
"--tw-prose-hr": "var(--color-foreground)",
|
||||
"--tw-prose-quotes": "var(--color-foreground)",
|
||||
"--tw-prose-quote-borders": "var(--color-foreground)",
|
||||
"--tw-prose-captions": "var(--color-foreground)",
|
||||
"--tw-prose-code": "var(--color-foreground)",
|
||||
"--tw-prose-pre-code": "var(--color-foreground)",
|
||||
"--tw-prose-pre-bg": "var(--color-background)",
|
||||
"--tw-prose-th-borders": "var(--color-foreground)",
|
||||
"--tw-prose-td-borders": "var(--color-foreground)",
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
plugins: [require("@tailwindcss/typography")],
|
||||
|
||||
Reference in New Issue
Block a user