rajinwonderland / react-code-blocks

React code blocks and code snippet components
https://react-code-blocks.rajinwonderland.vercel.app
MIT License
613 stars 81 forks source link

Can't overwrite styles in production with tailwindcss #70

Closed wiscaksono closed 2 years ago

wiscaksono commented 2 years ago

I tried to overwrite the existing styles with tailwindcss like this

.react-syntax-highlighter-line-number {
  @apply text-[#607B96];
}

code .token {
  @apply text-[#607B96] !important;
}

.efofCE {
  @apply bg-transparent p-0 !important;
}

.efofCE span {
  @apply bg-transparent !important;
}

.sc-bcXHqe.kBPKLM {
  @apply hidden !important;
}

And this is the result in develop. image

This is the result in production (vercel). image

how to fix this?

pawelkrystkiewicz commented 1 year ago

@wiscaksono How did you solved this? Did you somehow froze class names from being scrambled in prod?

wiscaksono commented 1 year ago

@pawelkrystkiewicz ah i forgot how to fix it, but you can check the code on my repository here https://github.com/wiscaksono/wiscaksono-site

pawelkrystkiewicz commented 1 year ago

@wiscaksono thanks! Although I already found the docs on how to add custom styles and this is enough for me.

It seems like you kept the approach of modifying by class name updates. I couldn't find those names in my instance which suggests that those just obscured versions of actual class names. Anyway solved, thanks 👏