Closed mil-ad closed 2 years ago
This is probably due to highlight.js dependency getting upgraded to latest versions?
Yes. Marp Core v3.x has included major update of highlight.js v10 -> v11. The base16
themes have actually moved to new locations so you should follow up the latest change at new location.
https://github.com/highlightjs/highlight.js/tree/main/src/styles/base16
- All Base16 themes now live in the
styles/base16
directory - this means some CSS files have moved. Please confirm themes you use reference the new locations._— https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md#styles-and-css_
Thanks those were super helpful pointers. I grabbed the latest style files but still see the same issue. However, I noticed if I add !important
to everything in the style file things begin to work fine. 🤔
https://github.com/marp-team/marp-core/blob/abc4e2edfae297ba16525270205dcdba161d38f9/themes/default.scss#L62-L76
In the current default theme, most selectors for highlight.js have become the narrowed shape pre .hljs-xxxxxx
after compiled to CSS, to avoid collision with user-defined class in Markdown. These have 0-1-1
CSS specificity.
Selectors for highlight also may be required 0-1-1
and higher specificity to overload. pre .hljs-xxxx
instead of .hljs-xxxx
.
You're absolutely right. That fixed it.
You sir are on top of your stuff. 💪🏼
Version of Marp Tool
3.2
Operating System
Linux
Environment
How to reproduce
I just noticed my custom CSS for highlight.js (copied from here) have stopped working since v.3.1.1
This is probably due to highlight.js dependency getting upgraded to latest versions? I did a bit of searching and didn't come across any breaking changes in recent versions of highlightjs so is it possible there's a problem on Marp's side?
Expected behavior
Actual behavior
Additional information
No response