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

How to stop inline code blocks from rendering with the backticks? #135

Closed
MichaelScoggins opened this issue Jan 26, 2021 · 5 comments
Closed

Comments

@MichaelScoggins
Copy link

When I use the prose classname in my sanity richText, it renders the backticks onto the page when I do not want this. I just want it to show in consolas or whatever font for the inline code.

@jasperro
Copy link

Why was this closed? The theming of the code blocks was changed in 47fe732. This looks very inconsistent with the <pre> theming. @adamwathan, could this be changed back to how it was before, or is there a way to override this in the tailwind configuration?

@adamwathan
Copy link
Member

This was changed before the library was even released. You can override the styles in your config:

#18

@jasperro
Copy link

Thanks! That worked perfectly.

@TeemuKoivisto
Copy link

So the answer in #18 works but just to save somebody's time, I'm going to paste it here for convenience's sake.

module.exports = {
  theme: {
    extend: {
      typography: {
        DEFAULT: {
          css: {
            'code::before': {
              content: '""'
            },
            'code::after': {
              content: '""'
            }
          }
        }
      },
    },
  },
  plugins: [require("@tailwindcss/typography")],
};

@vidhanio
Copy link

For future reference for Tailwind v3,

class="... prose-code:before:content-none prose-code:after:content-none"

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

No branches or pull requests

5 participants