Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ungoldman committed Jan 26, 2015
1 parent 48b7da3 commit 0453621
Show file tree
Hide file tree
Showing 11 changed files with 410 additions and 308 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# gfm.css changelog

## v1.0.3
* add `$gfm-body-color` and `$gfm-link-color` variables
* fix homepage url in package.json
* add defaults info to readme

## v1.0.2
* fix blockquote bottom margin issue

Expand Down
52 changes: 38 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# gfm.css

[![NPM](https://nodei.co/npm/gfm.css.png?downloads=true)](https://npmjs.org/package/gfm.css)

Styles for [github flavored markdown](https://help.github.com/articles/github-flavored-markdown/).

[![NPM](https://nodei.co/npm/gfm.css.png?downloads=true&stars=true)](https://npmjs.org/package/gfm.css)

## Usage

```
Expand All @@ -13,37 +13,61 @@ npm install gfm.css
*..do whatever you're into, then..*

```html
<link rel="stylesheet" href="gfm.css">
<html>
...
<link rel="stylesheet" href="path/to/gfm.css">
...
<article class="markdown-body">
<h1>rendered markdown content</h1>
<p>wow</p>
</article>
...
</html>
```

All styles are scoped to `.markdown-body`, as on github.

### Sass

You can also use this as a Sass library.
You can also use this as a [Sass](http://sass-lang.com/) library.

```scss
@import '../node_modules/gfm.css/source/gfm.scss'
```

#### Bonus

The following variables can be overridden:
You can take `gfm.scss` as a base set of styles and go bananas with your own style flavor. Note that you need to set any variables you want to override *before* the import statement. Here are all the defaults that can be overridden:

```scss
$gfm-body-font-size
$gfm-code-font-size
$gfm-body-font-family
$gfm-code-font-family
$gfm-input-font-family
$gfm-header-font-family
$gfm-body-font-size: 16px !default;
$gfm-code-font-size: 12px !default;
$gfm-body-color: #333;
$gfm-link-color: #4183c4;
$gfm-body-font-family: 'Helvetica Neue',
Helvetica,
'Segoe UI',
Arial,
freesans,
sans-serif !default;
$gfm-code-font-family: Consolas,
'Liberation Mono',
Menlo,
Courier,
monospace !default;
$gfm-input-font-family: Helvetica,
Arial,
freesans,
clean,
sans-serif,
'Segoe UI Emoji',
'Segoe UI Symbol' !default;
$gfm-header-font-family: $gfm-body-font-family !default;
```

This way you can take `gfm.scss` as a base set of styles and go from there with your own style flavor. Note that you need to set any variables you want to override *before* the import statement.

### Extra

Github's octicon anchors (for header links) and syntax highlighting styles are not included in the default build, but they're available in `source/` if you need them.
Github's octicon anchors (for header links) and syntax highlighting styles are not included in the default build, but they're available in `source/` as `gfm-octicon-anchors.scss` and `gfm-syntax.scss` respectively if you need them.

## Development

Expand Down
2 changes: 1 addition & 1 deletion gfm.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0453621

Please sign in to comment.