Skip to content
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

Add color modifiers #92

Merged
merged 3 commits into from
Nov 12, 2020
Merged

Add color modifiers #92

merged 3 commits into from
Nov 12, 2020

Conversation

adamwathan
Copy link
Member

This PR adds new color modifiers by default like prose-indigo, prose-blue, prose-pink, etc. that update link colors to match the modifier color. Useful for adding a little bit of branding to your content sections.

It uses the 600 shade of each color in your theme.colors configuration by default, excluding gray. If a color doesn't have a 600 shade it is skipped.

This is implemented simply as a default config, and not as any special logic inside the plugin. You can control which ones are enabled just like the size modifiers:

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('@tailwindcss/typography')({
      modifiers: ['sm', 'lg', 'blue', 'pink'],
    }),
    // ...
  ],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant