Giter Club home page Giter Club logo

Comments (5)

yhatt avatar yhatt commented on June 2, 2024

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

from marp-core.

mil-ad avatar mil-ad commented on June 2, 2024

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. 🤔

from marp-core.

yhatt avatar yhatt commented on June 2, 2024

pre {
border: 1px solid var(--color-border-default);
line-height: 1.15;
overflow: visible;
&::part(auto-scaling) {
// Slide height - padding * 2 - code's padding * 3 - code's border * 2
max-height: 529px;
}
// GitHub's prettylights -> Highlight.js
/* stylelint-disable selector-class-pattern */
.hljs {
color: var(--color-prettylights-syntax-storage-modifier-import);
}

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.

from marp-core.

mil-ad avatar mil-ad commented on June 2, 2024

You're absolutely right. That fixed it.

You sir are on top of your stuff. 💪🏼

from marp-core.

yhatt avatar yhatt commented on June 2, 2024

Update in v3.2.1: Allowed overloading default styles by a simple class definition .hljs-xxxx again. The pre element scoping is no longer required as same as v2.x.

Thank you for your feedback!

from marp-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.