I had no idea this was even possible. I was trying to make life easier for folks on my end that don't know html. :::bob becoming <div class="bob"> will be awesome. I've got a meeting in 15 minutes -- going to sing some more pandoc praise (coworkers must be getting sick of me singing by now...)
Is this something specific to pandoc, github markdown, or what?
You can of course do it manually with divs in your Markdown as well:
````markdown:::shallow
- a- b- c
:::
:::deep
- A- B
- a- b- c- C
:::````
and then in your CSS:
````cssdiv.shallow > ul { /* style here */ }
div.deep > ul { /* style here */ }````
The main point is that Pandoc doesn't support attributes on most elements, so you have to put block elements inside a div and inline elements inside a span, set the attributes on the div/span and use a child selector in CSS.
--Den ons 18 sep. 2019 01:39John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
Craig Parker <craigp@linuxacademy.com> writes:
> So if I define a ul.shallow and a ul.deep in my css, you're saying a lua
> filter would render (in the html) <ul class="shallow"> and <ul
> class="deep"> ?
No, I'm not saying that.
You could write a lua filter that would identify "shallow" and
"deep" lists, and insert a div with class "shallow" or "deep"
around the list.
Css could then have a rule like .shallow > ul or .deep > ul.
> Are creating lua filters anything like coding in other languages? I know
> bash and PHP...
sort of, yes. See the documentation for lua filters on the pandoc
website.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/yh480kr24eh4s5.fsf%40johnmacfarlane.net.
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuQ3GEoYovUB%2Btg6iSs_hL9bDGq7RCoDT93GemZXz%2BCSYw%40mail.gmail.com.
|
|
|
|
Craig
Parker Technical Writer Schedule a Meeting or Call 125 Bear Creek Parkway. Keller. Texas 76248 LinuxAcademy.com |