Saturday, January 4, 2014 at 6:09 PM

The #style directive

Suppose you like the built-in outline template, but you don't like the font we've chosen for paragraphs in Markdown text. Rather than force you to copy the whole template to change one style feature, you can use CSS to override them.

Create a directive called #style and underneath, put a headline with a name. It doesn't matter what you call it. Think of the title as a comment to yourself.

Under the title, include CSS styles as you would in the <style> section of an HTML page.

A picture named styles.gif

This style says make the Markdown text generated by Fargo a little larger and make it 1.5 spaced.

You can override styles locally if there's an individual page or group of pages that you want to have larger or smaller type. In other words, #style directives "cascade" just like CSS, only within the hierarchy of your website.

You can include macros in your styles.

Styles are included in templates with the userStyles () macro.

We add these styles to the page last, so they get to override all the defaults, as well as styles set by a <%customStylesScripts%> glossary entry.


Last built: Tue, Dec 9, 2014 at 3:29 PM

By Dave Winer, Saturday, January 4, 2014 at 6:09 PM. Yeah well, that's just, you know, like, your opinion, man.