Giter Club home page Giter Club logo

Comments (5)

yhatt avatar yhatt commented on May 18, 2024

There is no applied class even if setting up size global directive at the moment. Marpit local directives are assigned data attributes (data-xxx="xxx") and CSS variables to <section> elements, but global directives are not.

As my position, I recommend to divide theme file if you want greatly different styling, to avoid too complex CSS.

But what your use case can we cover if Marp Core had assigned some class (or data attribute) depending on size?

from marp-core.

melck avatar melck commented on May 18, 2024

Ok, I understand. Firstly I use mainly marp to write slide deck.

I like so much the simplicity that i wanted to use it to make printed document (A4 size). I need header, footer, page, etc. To keep this simple i wanted to include all css in one theme and split it by size.

With this i will be able to write only markdown with vscode, and never have to use office product again :D.

Do you think marpit can be used for that ?

from marp-core.

yhatt avatar yhatt commented on May 18, 2024

I feel you. There are not many better solution for Markdown -> PDF document conversion with simple styling.

I'll consider to expose which size selected through global directive. In theme CSS, specific style could apply by size.

/*!
 * @theme xxx
 * @size 4:3 960px 720px
 * @size A4 210mm 297mm
 */

section {
  /* Default style (16:9) */
}

section[data-size="4:3"] {
  /* Style for 4:3 slide */
}

section[data-size="A4"] {
  /* Style for A4 slide */
}

from marp-core.

melck avatar melck commented on May 18, 2024

Perfect it's exactly what i need :)

from marp-core.

yhatt avatar yhatt commented on May 18, 2024

data-size attribute is available in just released v1.0.0.

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.