Issue with font sizes in CSS

Frank's Avatar


05 Apr, 2017 09:36 AM

Dear Brett,

I have an issue with finetuning font sizes in Marked 2.5.10. When I add decimal fractions to font-sizes in CSS, e.g. font-size: 8.8pt !important, Marked appears to be either ignoring the decimal fractions or rounding these off to some other decimal fraction.

Also, when I leave out !important, Marked appears to be ignoring the font size within the #wrapper section of @media print in CSS and uses soms other font size that I have not been able to trace. I have Custom font size for Export/Print turned off in Preferences.

Could you please help me solve these issues? Many thanks.

Best regards,

  1. Support Staff 1 Posted by Brett on 05 Apr, 2017 04:27 PM

    Brett's Avatar

    I think the !important may be entirely necessary right now. I've used
    some brute force on print font sizes because a lot of people using
    custom or additional CSS don't properly affect the print section and it
    avoids extra customer support to just define a reasonable size by
    default. I can take a look at making it slightly less specific, though,
    to allow easier overrides.

    As for the rest, Marked doesn't do anything special with font size
    increments, so if the decimals are being rounded it's more of a webkit
    issue and you should see the same issue in Safari, possibly chrome. In
    general (and somewhat annoyingly) pt can be less predictable than px,
    especially when outputting to a print format.

    If you send me the custom CSS you're using, I'd be happy to do some
    testing on this end and see if there are changes you can make, or
    changes I need to make to solve the issue.


  2. 2 Posted by loukas on 20 Jun, 2017 07:25 PM

    loukas's Avatar

    I'm following

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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