mirror of
https://github.com/sindresorhus/github-markdown-css.git
synced 2024-03-22 13:10:53 +08:00
update to new GitHub readme width
This commit is contained in:
parent
ac2b917fc3
commit
2120fb447b
|
@ -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>
|
||||||
|
|
|
@ -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"
|
||||||
|
|
15
readme.md
15
readme.md
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user