custom CSS not applying
// Please enter a detailed description of the issue // Description of the issue:
Marked is not fully loading, or recognizing, a custom style sheet when I "apply" it to a document. In particular, it is not recognizing a change in type face and is simply using the default (Times?). If I delete the custom style sheet from the preferences tab for doing so and then add it back, it works again. If I quit Marked and come back ... the cycle repeats.
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
// If applicable please attach a sample document that causes the issue for you.
// Configuration (do not edit) Marked 2 1040 (Mac App Store)
macOS Version: 13.1
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: YES
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: swiss
defaultProcessor: MultiMarkdown
enableMiniMap: YES
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft: LAUDUN - %title
printHeaderTopRight: %page
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
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
1 Posted by Mark Hedges on 13 Jan, 2023 08:01 PM
Second this. Styles don't work.
2 Posted by john laudun on 13 Jan, 2023 08:25 PM
Okay, so I didn't know this went into a discussion forum. But, second, I came across the page on Creating Custom Styles (https://marked2app.com/help/Writing_Custom_CSS.html), and I'm taking a look at it now to see if perhaps having the CSS structured in a particular way will get things working.
Support Staff 3 Posted by Brett on 13 Jan, 2023 08:58 PM
Would either of the users on this thread care to share their custom style so I can see if there are any errors that might be affecting this? I use custom styles every day and never have an issue.
4 Posted by Mark Hedges on 17 Jan, 2023 02:54 PM
Any style that I pick in the preferences. It doesn't apply. The default style is stuck. This was a fresh installation of the program. Maybe you have some kind of preference file from an old version that the new version didn't create or created incorrectly.
5 Posted by john on 23 Jan, 2023 05:56 PM
Here's the custom style sheet.
Support Staff 6 Posted by Brett on 23 Jan, 2023 07:35 PM
@john style looks fine. I'm going to have to recommend that you delete preferences and reboot to see if that solves the issue.
To delete your preferences with the MAS version of Marked 2:
~/Library/Containers/com.brettterpstra.marked2/Data/Library/Preferences/com.brettterpstra.marked2.plist
(and any other files starting with com.brettterpstra.marked2). If you're not sure how to access this folder, open Finder and press ⌘⇧G, then paste "~/Library/Containers/com.brettterpstra.marked2/Data/Library/Preferences/" (without quotes) into the box.The directions for doing this with the direct version are the same, but the preference file is located in ~/Library/Preferences.
7 Posted by rob78293 on 12 Jul, 2024 03:09 PM
@brett I'm having problems with this too. I've tried deleting that preference file and it didn't help.
Relaunching the app seems to "forget" the styles. It could be something to do with permissions?
I don't think it has anything to do with the CSS file itself, but I've added it anyway. It's in a local Git repo.
Support Staff 8 Posted by Brett on 12 Jul, 2024 03:41 PM
I'm headed off to a conference this weekend, but will schedule this to look into next week. Sorry for the delayed response.
-Brett
On 12 Jul 2024, at 10:09, rob78293 wrote:
Support Staff 9 Posted by Brett on 16 Jul, 2024 07:09 PM
@rob78293, I tested with your CSS file and was unable to replicate the issue. Can you do two things for me?
When the serif font (missing stylesheet) version is displaying, does ⌘R restore the default style? And at that point what style is showing in the dropdown?
10 Posted by rob78293 on 19 Jul, 2024 10:23 PM
// Please enter a detailed description of the issue // Description of the issue:
Launching loses formatting for custom css (and opens with default style). Pressing refresh (⌘R) does indeed solve the problem. I've attached a video link but it expires in 2 days!
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
// If applicable please attach a sample document that causes the issue for you.
Video here: https://streamable.com/4jfl12 — I don't want to upload it on this forum as it's CV type stuff ;)
// Configuration (do not edit) Marked 2 1058 (Mac App Store)
macOS Version: 12.7.5
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 0
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES