Skip to content

Add inherit theme for if theming is undesired. #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update styles.js to add a reset color theme
If colours are already defined external to the prose component, it is good to have an option to use those instead of needing a greyscale theme.
  • Loading branch information
radiosilence authored Dec 7, 2024
commit 14d2bb21ab99c08ee0b4d85e5571332610b772b9
43 changes: 43 additions & 0 deletions src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,49 @@ let defaultModifiers = {
},
},

// Inherit color theme

inherit: {
css: {
'--tw-prose-body': "inherit",
'--tw-prose-headings': "inherit",
'--tw-prose-lead': "inherit",
'--tw-prose-links': "inherit",
'--tw-prose-bold': "inherit",
'--tw-prose-counters': "inherit",
'--tw-prose-bullets': "inherit",
'--tw-prose-hr': "inherit",
'--tw-prose-quotes': "inherit",
'--tw-prose-quote-borders': "inherit",
'--tw-prose-captions': "inherit",
'--tw-prose-kbd': "inherit",
'--tw-prose-kbd-shadows': "inherit",
'--tw-prose-code': "inherit",
'--tw-prose-pre-code': "inherit",
'--tw-prose-pre-bg': "inherit",
'--tw-prose-th-borders': "inherit",
'--tw-prose-td-borders': "inherit",
'--tw-prose-invert-body': "inherit",
'--tw-prose-invert-headings': "inherit",
'--tw-prose-invert-lead': "inherit",
'--tw-prose-invert-links': "inherit",
'--tw-prose-invert-bold': "inherit",
'--tw-prose-invert-counters': "inherit",
'--tw-prose-invert-bullets': "inherit",
'--tw-prose-invert-hr': "inherit",
'--tw-prose-invert-quotes': "inherit",
'--tw-prose-invert-quote-borders': "inherit",
'--tw-prose-invert-captions': "inherit",
'--tw-prose-invert-kbd': "inherit",
'--tw-prose-invert-kbd-shadows': "inherit",
'--tw-prose-invert-code': "inherit",
'--tw-prose-invert-pre-code': "inherit",
'--tw-prose-invert-pre-bg': "inherit",
'--tw-prose-invert-th-borders': "inherit",
'--tw-prose-invert-td-borders': "inherit",
},
},

// Link-only themes (for backward compatibility)

red: {
Expand Down