tocstyle.css causes issues with Fontawesome when used in document
Hi,
I've been pulling my hair out on this one and have lost a whole day's work (I regret nothing!!),
I was trying to use Font Awesome in some custom styled documents. Unfortunately, Marked uses Font Awesome in the creation of Tables of Content (I didn't think to check that for a long time) and the Font Awesome css in tocstyle is causes issues with stacked icons.
The plain HTML copy worked as expected, but generated HTML and PDFs did not.
For a quick fix, add
.fa-stack-2x {
font-size: 1em !important;
}
.fa-stack {
width: 2.5em !important;
}
to your custom CSS.
May suggest changing the classes in TOC to not clash with the standards?
Also, an easy to turn the libraries that Marked uses on and off would be extremely great.
Dan
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 11 Aug, 2021 12:48 PM
Turning libraries Marked uses for core functionality would be problematic. That said, the only reason marked has FontAwesome included at all was based on user requests. Stacking must be a new feature?
Thanks,
Brett
2 Posted by dan on 13 Aug, 2021 07:59 AM
Hi Brett,
I'm not sure if it's new or not, but it appears hard coded in toc stylesheet.
I've also run into a problem with the "Prevent orphaned headlines" option where Marked adds or ignores some css instructions when exporting to paginated PDF. Renders fine in the preview and HTML.
The first image is with the option turned on.
This is the css that gets ignored.
Support Staff 3 Posted by Brett on 13 Aug, 2021 12:23 PM
When collapse headers is enabled, markup is injected to wrap around headers and their succeeding content. Therefore headers are no longer contiguous in the DOM because they're nested in separate parent containers.
Thanks,
Brett