CSS for APA Outline -- could I use the code?

stevesolari's Avatar

stevesolari

29 Jun, 2020 02:20 PM

Out of all the text editors and previewers I've used over the years, I like the APA outline style in Marked the best. I've tried to reproduce it in editors that offer their own in-app previews, but it's problematic depending on their in-app outline numbering system, flavor of markdown, etc. Is there a way to see the CSS for Marked's API style so I can reproduce it where Marked doesn't come in to play?

I get the basics --

ol {
    list-style-type: upper-roman; 
    }
ol ol {
list-style-type: upper-alpha; 
    }
ol ol ol {
    list-style-type: decimal; 
    }
ol ol ol ol {list-style-type: lower-alpha;
    }
ol ol ol ol ol {list-style-type: lower-roman;
    }
ol ol ol ol ol ol {list-style-type: disc;
    }

Where I usually run into trouble is the counter reset, like this:

ol {list-style: none; counter-reset: li}
ol > li {
    counter-increment: li;
}

If the code is proprietary, I understand. I've just spent way too long trying to re-create that APA CSS so any help would be so appreciated!

  1. Support Staff 1 Posted by Brett on 29 Jun, 2020 03:43 PM

    Brett's Avatar

    You've got pretty much the same thing that Marked uses. It does some
    special handling to allow creating outlines from headers, too, but it
    boils down to the list-style-types you have. There's no counter used in
    the APA outline, so no reset should be necessary.

    I would gladly share the CSS, but it won't be of much use outside of
    Marked. It's overly specific and really won't port well to other uses.

    -Brett

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

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