8000 Document mobile responsiveness (#45) · sindresorhus/github-markdown-css@c59b17b · GitHub
[go: up one dir, main page]

Skip to content

Commit c59b17b

Browse files
jpucksindresorhus
authored andcommitted
Document mobile responsiveness (#45)
1 parent 576e8f6 commit c59b17b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ $ npm install --save github-markdown-css
1818

1919
## Usage
2020

21-
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.
21+
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, and `15px` padding for mobile.
2222

2323
```html
24+
<meta name="viewport" content="width=device-width, initial-scale=1">
2425
<link rel="stylesheet" href="github-markdown.css">
2526
<style>
2627
.markdown-body {
@@ -30,6 +31,12 @@ Import the `github-markdown.css` file and add a `markdown-body` class to the con
3031
margin: 0 auto;
3132
padding: 45px;
3233
}
34+
35+
@media (max-width: 767px) {
36+
.markdown-body {
37+
padding: 15px;
38+
}
39+
}
3340
</style>
3441
<article class="markdown-body">
3542
<h1>Unicorns</h1>

0 commit comments

Comments
 (0)
0