CSS Modules - CustomClass not applied to <pre>?
See original GitHub issueInformation:
- Prism version: Latest on PrismJS doc page, 1.21.0
- Plugins: CustomClass
- Environment: Browser
Description
I am using CSS Modules so the CustomClass plugin worked a treat (e.g. token___foo
) however I noticed that <pre>
was still using language-XX
rather than language-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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Some of CSS modules styles are not being applied
I have a hard time applying one of my CSS rules using CSS modules. Here is React code and CSS styles. All rules...
Read more >composeClasses should append keys from classes, not ...
So if my custom class name why I pass as prop is applied before the internal one, and the rule is to use...
Read more >Adding CSS | Enact
In this part we've explored applying CSS classes to React components, importing locally-scoped classes from a CSS module, and using expressions in JSX...
Read more >How to Edit, Customize, and Override Bootstrap CSS to Suit ...
The first way — using CSS overrides— applies to sites using BootstrapCDN or the pre-compiled versions of Bootstrap.
Read more >Tailwind CSS from Zero to Hero - Dark Mode, JIT & More!
The two utility classes provided are sr-only and not-sr-only. sr-only: this is used to hide any HTML element visually but not from screen ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s true. I’ll add it.
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
code
andpre
elements. We’d have to add new functionality to Core specifically for this.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
line-numbers___TeamID
: The Line numbers plugin won’t be active with that class. Are you sure that the plugin still works?