update to new GitHub readme width

This commit is contained in:
Sindre Sorhus 2015-12-06 19:56:04 +01:00
parent ac2b917fc3
commit 2120fb447b
3 changed files with 10 additions and 12 deletions

View File

@ -7,10 +7,11 @@
<link rel="stylesheet" href="github-markdown.css"> <link rel="stylesheet" href="github-markdown.css">
<style> <style>
body { body {
box-sizing: border-box;
min-width: 200px; min-width: 200px;
max-width: 790px; max-width: 980px;
margin: 0 auto; margin: 0 auto;
padding: 30px; padding: 45px;
} }
</style> </style>
</head> </head>

View File

@ -7,7 +7,7 @@
"author": { "author": {
"name": "Sindre Sorhus", "name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com", "email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com" "url": "sindresorhus.com"
}, },
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"

View File

@ -9,29 +9,26 @@
## Install ## Install
Download [manually](https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css) or with a package-manager. Download [manually](https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css) or with npm:
```sh
$ npm install --save github-markdown-css
``` ```
$ npm install --save github-markdown-css
```sh
$ bower install --save github-markdown-css
``` ```
## Usage ## Usage
Import the `github-markdown.css` file and add a `markdown-body` class to the container of your rendered Markdown and set a width for it. GitHub uses `790px` width and `30px` padding. Import the `github-markdown.css` file and add a `markdown-body` class to the container of your rendered Markdown and set a width for it. GitHub uses `980px` width and `45px` padding.
```html ```html
<link rel="stylesheet" href="github-markdown.css"> <link rel="stylesheet" href="github-markdown.css">
<style> <style>
.markdown-body { .markdown-body {
box-sizing: border-box;
min-width: 200px; min-width: 200px;
max-width: 790px; max-width: 980px;
margin: 0 auto; margin: 0 auto;
padding: 30px; padding: 45px;
} }
</style> </style>
<article class="markdown-body"> <article class="markdown-body">