Skip to content

Using Tailwind CSS Styles in Markdown/MDX content w/@next/mdx? #10147

Discussion options

You must be logged in to vote

I found the problem. I changed my tailwind configuration from this:

module.exports = {
  (...)
  content: [
    "./pages/**/*.{js,ts,jsx,tsx,md, mdx}",
    "./components/**/*.{js,ts,jsx,tsx,md, mdx}",
    "./content/**/*.{js,ts,jsx,tsx,md, mdx}",
    (...)
};

to this:

module.exports = {
  (...)
  content: [
    "./pages/**/*.{js,ts,jsx,tsx,md,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,md,mdx}",
    "./content/**/*.{js,ts,jsx,tsx,md,mdx}",
    (...)
};

A single space between the ',' and 'mdx' was breaking things 🤦‍♂️

Replies: 6 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by colinsteidtmann
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wongjn
Comment options

Comment options

You must be logged in to vote
2 replies
@nathankirk91
Comment options

@heygwangjin
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
8 participants