public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* The names of the default CSS styles
@ 2022-08-27  6:56 name name
       [not found] ` <ce4037fa-b4cd-4266-a036-a91b8fcb45b0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: name name @ 2022-08-27  6:56 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1092 bytes --]

If I convert the following snippet, with the `--standalone` option, from 
Markdown to HTML,

~~~~
~~~ {.language .numberLines startFrom=100}
fenced code block line 100
fenced code block line 101
~~~
~~~~

... the resulting HTML will contain a list of styles included by Pandoc by 
default.

Does anybody know why those styles named so differently, inconsistently? 
See the excertp below: alllowercase for small caps, lowercase-with-hyphens 
for divs with the hanging indent, and camelCase for source code blocks.

~~~
span.smallcaps{font-variant: small-caps;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
pre.sourceCode { margin: 0; }
~~~

What is the logic there?

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ce4037fa-b4cd-4266-a036-a91b8fcb45b0n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1582 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The names of the default CSS styles
       [not found] ` <ce4037fa-b4cd-4266-a036-a91b8fcb45b0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-08-27 10:39   ` Albert Krewinkel
       [not found]     ` <93D9EB82-B83A-4DE1-AEF8-70FC1BB137A8-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Krewinkel @ 2022-08-27 10:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]


> name name <ivan20151013-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> hat am 27.08.2022 08:56 CEST geschrieben:
>
> Does anybody know why those styles named so differently,
> inconsistently? See the excertp below: alllowercase for small caps,
> lowercase-with-hyphens for divs with the hanging indent, and camelCase
> for source code blocks.
>
> ~~~
> span.smallcaps{font-variant: small-caps;}
> div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
> pre.sourceCode { margin: 0; }
> ~~~
>
> What is the logic there?

`.sourceCode` is the class used by reveal.js, so pandoc has to match
that.

The other instances are most likely historic / incidental: pandoc is a
16 year old project and includes code contributed by more than 400
people, an each one had different taste in code style. Moreover, the style
used in a programming language leaks into the generated code. E.g.,
Haskell code uses camelCase, so class names often tend to use camelCase
as well. There is also no pandoc coding standard for CSS, so these
differences are to be expected.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/93D9EB82-B83A-4DE1-AEF8-70FC1BB137A8%40zeitkraut.de.

[-- Attachment #2: Type: text/html, Size: 1901 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The names of the default CSS styles
       [not found]     ` <93D9EB82-B83A-4DE1-AEF8-70FC1BB137A8-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2022-08-27 18:13       ` John MacFarlane
  0 siblings, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2022-08-27 18:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw



> On Aug 27, 2022, at 3:39 AM, Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> wrote:
> 
> 
> > name name <ivan20151013-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> hat am 27.08.2022 08:56 CEST geschrieben:
> >
> > Does anybody know why those styles named so differently,
> > inconsistently? See the excertp below: alllowercase for small caps,
> > lowercase-with-hyphens for divs with the hanging indent, and camelCase
> > for source code blocks.
> >
> > ~~~
> > span.smallcaps{font-variant: small-caps;}
> > div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
> > pre.sourceCode { margin: 0; }
> > ~~~
> >
> > What is the logic there?
> 
> `.sourceCode` is the class used by reveal.js, so pandoc has to match
> that.

But that's not why, because sourceCode has been used by pandoc since before reveal.js existed!

Yes, there are some inconsistencies; it's tough to keep everything in sync in such a big project.  Restoring consistency would break backwards compatibility, though, so probably not worth it.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-27 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27  6:56 The names of the default CSS styles name name
     [not found] ` <ce4037fa-b4cd-4266-a036-a91b8fcb45b0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-08-27 10:39   ` Albert Krewinkel
     [not found]     ` <93D9EB82-B83A-4DE1-AEF8-70FC1BB137A8-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-08-27 18:13       ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).