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

建议参考tailwindcss-typography,做成插件一键导入项目 #118

Open
18601673727 opened this issue May 3, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@18601673727
Copy link

https://github.com/tailwindlabs/tailwindcss-typography

方便灵活的配置

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  theme: {
    extend: {
      typography: {
        // 配置@tailwindcss/typography
        DEFAULT: {
          css: {
            pre: null, // 停用该样式
            code: null, // 停用该样式
          },
        },
      },
    },
  },
  darkMode: "class",
  plugins: [
    require("@tailwindcss/typography"),
  ],
}

简单的@apply

.my-component {
  @apply prose dark:prose-invert prose-stone prose-a:text-primary max-w-none;
}
@sivan sivan added the enhancement New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants