Commit Graph

56 Commits

Author SHA1 Message Date
John MacFarlane 27ee5a7696 Change lhs tests so they don't use --standalone.
This will avoid test failures due to minor changes in
skylighting versions, e.g. #9589.
2024-03-19 07:58:42 -07:00
John MacFarlane 4ca2de1715 Update test suite for latest skylighting-format-blaze-html. 2024-02-27 20:02:52 -08:00
John MacFarlane 907b1192d1 Remove html5shiv from default HTML5 template.
I don't think we need to support IE < 9 any more!
2023-12-20 10:10:21 -08:00
John MacFarlane f9153e86bb Update tests for skylighting-format-blaze-html change. 2023-08-27 10:57:09 -07:00
John MacFarlane 948567f200 Fix tests for change to template in #8999. 2023-08-13 19:23:53 -07:00
John MacFarlane d7c43fda32 Add clause for svg to default CSS for HTML.
Suggested at #8969.
2023-07-26 09:15:24 -06:00
Albert Krewinkel 832d66e8a3 styles.html: fix task-list styling in reveal.js
Fixes: #8731
2023-03-29 11:15:47 -07:00
John MacFarlane 8a10300785 HTML style template: put Consolas before Lucida Console for code font.
This is to prevent Lucida Console from being used on Windows, where
there seems to be a spacing issue in some applications, with boldface
glyphs wider than regular ones.

Closes #8543.
2023-01-13 08:47:19 -08:00
John MacFarlane a682e72c03 Add code { hyphens: manual; } to HTML and EPUB CSS.
Closes #8530.
2023-01-06 10:50:48 -08:00
John MacFarlane 334903bb9d HTML template: remove default font size, line height...
...and font family in default inline css.  Closes #8423
(see comments there for motivation).  `mainfont`, `fontsize`,
and `linestretch` can still be used as before; the only difference
is that we no longer provide opinionated defaults.

This commit also adds a `maxwidth` variable that sets `max-width`;
if not set, 36em is used as a default.
2022-11-09 17:03:12 -08:00
Marcin Serwin 347fe49115 Change default background color of PDFs generated via HTML (#8422)
* Change default background color of PDFs generated via HTML

* Update tests
2022-11-04 18:13:02 -07:00
John MacFarlane 1a61eec293 Adjust tests for CSS change; add CSS comments to mark...
highlighting CSS and citations CSS in the source.
2022-10-17 16:59:56 -07:00
Albert Krewinkel 16d134218b HTML writer: revert to using width property for column widths
The default `flex` and `overflow-x` properties of a column are set to
`auto`. In combination, these changes allow to get good results when
using columns with or without explicit widths.
2022-08-22 15:32:39 +02:00
John MacFarlane 473c3f22ec Improve default CSS for task lists.
This ensures that there is a space between the checkbox
and the following content and that subsequent content lines up.

Closes #8151.

Supersedes and closes #8163.
2022-08-03 09:51:21 -07:00
Albert Krewinkel 0e8f424d9e HTML: use CSS flex boxes for columns.
This allows to render an arbitrary number of columns, while the previous
approach assumed exactly two columns.
2022-08-01 10:12:13 -07:00
John MacFarlane 82bf0cb9d4 Fix tests for d2bd9abc4d 2022-07-31 11:03:17 -07:00
John MacFarlane 9aff86143e Require skylighting 0.12.3.1 and update tests. 2022-05-31 19:49:27 -07:00
Mauro Bieg 9e60142cc9 CSS in HTML template: adjust #TOC and h1 on mobile (#7835) 2022-01-16 09:22:43 -08:00
Mauro Bieg de4da56079 document-css: reset overflow-wrap on code blocks
fixes #7423
2021-07-05 08:57:23 -07:00
John MacFarlane ff58237d2a Update test with new skylighting CSS. 2020-12-17 11:10:00 -08:00
John MacFarlane 5760cd850f Default CSS tweaks.
These changes restore the 20px font size while increasing readibility by
reducing line width. (The number of words per line is now similar to
that of pandoc's default LaTeX/PDF output.)  With the narrower lines, we
also need less interline and interparagraph space, so the content
becomes more compact and skimmable:

- Change default font size back to 20px.
- Set font-size for print media to 12pt.
- Reduce interline space.
- Reduce interparagraph space.
- Reduce line width.
- Remove the special `line-height: 1` for table cells,
  which I had suggested but which now seems a mistake.
- Remove the special line-height for pre.
- Ensure that there is a bit more space before a heading
  than after.
- Slightly reduced space after title header.
2020-11-02 10:51:18 -08:00
John MacFarlane ea45837372 Default CSS: avoid padding and color if monobackgroundcolor not given.
This makes the default more austere, while putting the padded,
colored code elements within easy reach.
2020-11-01 14:29:03 -08:00
Mauro Bieg 95d8713633 Updates to default CSS (#6786)
- Fix margin before codeblock
- Add `monobackgroundcolor` variable, making the background color
  and padding of code optional.
- Ensure that backgrounds from highlighting styles take precedence over
  monobackgroundcolor
- Remove list markers from TOC
- Add margin-bottom where needed
- Remove italics from blockquote styling
- Change borders and spacing in tables to be more consistent with other
   output formats
- Style h5, h6
- Decrease root font-size to 18px
- Update tests for styles.html changes
- Add CSS example to MANUAL
2020-11-01 14:22:58 -08:00
Mauro Bieg caa225ad82 Add CSS to default HTML template (#6601) 2020-09-19 16:13:50 -07:00
Albert Krewinkel 3c07b1d9b6 Fix tests for skylighting 0.10 2020-08-31 21:22:03 +02:00
Lila f4185fcef0 Use CSS in favor of <br> for display math (#6372)
Some CSS to ensure that display math is
displayed centered and on a new line is now included
in the default HTML-based templates; this may be
overridden if the user wants a different behavior.
2020-05-18 22:45:44 -07:00
John MacFarlane 46179d5b3e Use latest skylighting.
This adds `aria-hidden="true"` to the empty a elements, which
helps people who use screen readers.
2020-05-12 14:37:07 -07:00
John MacFarlane 64f78b3d5f HTML-based templates: Add CSS to suppress bullet on unordered task lists. 2019-12-05 09:36:34 -08:00
John MacFarlane 381654a704 Add div.hanging-indent CSS to HTML templates. 2019-09-05 12:42:23 -07:00
John MacFarlane bb362fd76c Add partial styles.html in HTML5 template.
Avoid duplication in HTML templates by using styles.html partial.
Change indentation of styles in template.
2019-09-05 12:39:50 -07:00
John MacFarlane 968d2046a3 Update test for new skylighting. 2019-07-14 10:48:14 -07:00
John MacFarlane 3593dcda61 Use skylighting 0.8. 2019-05-27 12:15:43 -07:00
John MacFarlane b6cf490efd Use latest skylighting. 2019-02-10 08:06:53 -08:00
John MacFarlane 8673eb079b Removed superfluous sourceCode class on code blocks.
* These were added by the RST reader and, for literate Haskell,
  by the Markdown and LaTeX readers.  There is no point to
  this class, and it is not applied consistently by all readers.
  See #5047.

* Reverse order of `literate` and `haskell` classes on code blocks
  when parsing literate Haskell. Better if `haskell` comes first.
2019-01-08 11:36:33 -08:00
John MacFarlane 9fe6d91a1a Remove unnecessary type="text/css" on style and link for HTML5.
Closes #5146.
2018-12-14 11:29:35 -08:00
John MacFarlane 58eb78c437 Fixed tests for new skylighting. 2018-10-08 23:16:50 -07:00
John MacFarlane edcfbccf5d Use skylighting 0.7.2. Adjust tests.
This should fix commercialhaskell/stackage#3719, once
a new release is made.
2018-06-09 13:34:21 -07:00
John MacFarlane 718b2c5837 HTML writer: Use br elements in line blocks...
instead of relying on CSS.  Closes #4162.  HTML-based templates have had
the custom CSS for div.line-block removed.  Those maintaining custom
templates will want to remove this too.

We still enclose line blocks in a div with class line-block.
2017-12-26 08:40:33 -08:00
John MacFarlane 5e039d913f Changes for skylighting-0.5.
This fixes a bug in 2.0.4, whereby pandoc could not
read the theme files generated with `--print-highlight-style`.

It also fixes some CSS issues involving line numbers.
Highlighted code blocks are now enclosed in a div with class
sourceCode.

Highlighting CSS no longer sets a generic color for pre
and code; we only set these for class `sourceCode`.

This will close #4133 and #4128.
2017-12-10 21:13:05 -08:00
John MacFarlane c94b970ced Include default CSS for 'underline' class in HTML-based templates. 2017-12-03 20:36:08 -08:00
John MacFarlane 8b0b4cd848 Update tests for new skylighting. 2017-11-28 10:49:42 -08:00
John MacFarlane 3fdf04614a Update tests for skylighting changes. 2017-11-21 22:57:10 -08:00
John MacFarlane b2bde69384 Fix test output for latest skylighting. 2017-11-04 22:18:13 -07:00
John MacFarlane a41015b929 Updated tests. 2017-11-03 11:46:15 -07:00
John MacFarlane 642d603666 Improved support for columns in HTML.
* Move as much as possible to the CSS in the template.
* Ensure that all the HTML-based templates (including epub)
  contain the CSS for columns.
* Columns default to 50% width unless they are given a width
  attribute.

Closes #4028.
2017-11-02 20:57:05 -07:00
John MacFarlane 856587ff63 Use latest skylighting; ensure no duplicate ids on code lines.
The line identifiers are built using the code block's identifier
as a prefix. If the code block has null identifier, we use
"cb1", "cb2", etc.

Closes #4031.
2017-11-02 16:03:40 -07:00
John MacFarlane 76886678a6 Use skylighting 0.4.2.
This prevents the problem with extra space around highlighted
code blocks (closes #3996).

Note that we no longer put an enclosing div around highlighted
code blocks.  The pre is the outer element, just as for unhighlighted
blocks.
2017-10-26 15:57:55 -07:00
John MacFarlane a1c11b048a Updated lhs-test for new skylighting. 2017-09-09 21:05:31 -07:00
John MacFarlane 892a4edeb1 Implement multicolumn support for slide formats.
The structure expected is:

    <div class="columns">
      <div class="column" width="40%">
        contents...
      </div>
      <div class="column" width="60%">
        contents...
      </div>
    </div>

Support has been added for beamer and all HTML slide formats.

Closes #1710.

Note:  later we could add a more elegant way to create
this structure in Markdown than to use raw HTML div elements.
This would come for free with a "native div syntax" (#168).
Or we could devise something specific to slides
2017-08-14 23:17:44 -07:00
John MacFarlane 66b08391b3 HTML line block: Use class instead of style attribute.
We now issue `<div class="line-block">` and include a
default definition for `line-block` in the default
templates, instead of hard-coding a `style` on the
div.

Closes #1623.
2017-04-25 23:07:30 +02:00