Comments (5)
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.
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.
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.
Perfect it's exactly what i need :)
from marp-core.
data-size
attribute is available in just released v1.0.0.
from marp-core.
Related Issues (20)
- Mathjax formulas looking "bold" when exported to pdf on some pdf viewers HOT 2
- [v4?] New code highlighter
- [v4] Math syntax: GFM vs Pandoc based
- Slugify Markdown headers
- Relax HTML allowlist HOT 4
- CSS for highlight.js are not picked up since v3.1.1 HOT 5
- Content overlap with header and footer in included themes HOT 2
- Emoji Rendering Discrepancy Between Inline and Block Elements HOT 1
- Usage or marp-core in browser context HOT 2
- Emoji plugin: Allow using other emoji vendors HOT 3
- [bug] import failure `i is not a function` HOT 5
- Trouble rendering HTML and Markdown in the same line HOT 1
- A Marp constructor option, emoji.twemoji.base, seems not working HOT 1
- Overriding hljs-attr color does not work HOT 2
- [Regression] Auto-scaling for KaTeX block is always enable regardless of `@auto-scaling` theme metadata
- TypeError: u2 is not a function HOT 7
- Nanoid error HOT 4
- Images gallery HOT 1
- per-element animations HOT 2
- How to create, publish and use a theme? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marp-core.