-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CSS Modules - CustomClass not applied to <pre>? #2510
Comments
This is the intended behavior. Custom class only affects the Also, changing the classes of the |
Thanks @RunDevelopment for a prompt response! I did notice that every class (except for Out of curiosity, what makes makes it troublesome if CustomClass is applied for On checking the CSS modules in dev tools: Disabled
Enabled
I can see that |
What? Whatever is causing this, it's not our Custom Class plugin. It can't do that.
Currently, there's no (standard) way to change the class names added (or removed) to (or from) the
I'm sorry, What is that supposed to mean? Prism itself can't really handle CSS modules, AFAIK, but I also know almost nothing about CSS modules. Could you please explain what you mean in more detail? Also, regarding |
My apologies, @RunDevelopment, for lack of context re:
I meant to say that CSS Modules was in place and the scoped class names show that Prism classes are there, I was hoping there was a way to leverage that. But as you indicated, it would require a change in Prism Core. I wonder if this doc page would benefit from a blurb indicating that the plugin applies to the tokens only? |
That's true. I'll add it. |
Information:
Description
I am using CSS Modules so the CustomClass plugin worked a treat (e.g.
token___foo
) however I noticed that<pre>
was still usinglanguage-XX
rather thanlanguage-XX___foo
.Example
Looks like the doc page https://prismjs.com/plugins/custom-class/#example has the same issue as below:
I wonder if a hook is missing as
wrap
seems to apply for inside the code snippet only.The text was updated successfully, but these errors were encountered: