Coder Social home page Coder Social logo

nturpin0 / github-markdown-css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sindresorhus/github-markdown-css

5.0 1.0 1.0 331 KB

The minimal amount of CSS to replicate the GitHub Markdown style

Home Page: https://sindresorhus.com/github-markdown-css

License: MIT License

CSS 22.40% HTML 77.60%

github-markdown-css's Introduction

github-markdown-css

The minimal amount of CSS to replicate the GitHub Markdown style

Install

Download manually, from CDNJS, or with npm:

$ npm install github-markdown-css

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 980px width and 45px padding, and 15px padding for mobile.

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="github-markdown.css">
<style>
	.markdown-body {
		box-sizing: border-box;
		min-width: 200px;
		max-width: 980px;
		margin: 0 auto;
		padding: 45px;
	}

	@media (max-width: 767px) {
		.markdown-body {
			padding: 15px;
		}
	}
</style>
<article class="markdown-body">
	<h1>Unicorns</h1>
	<p>All the things</p>
</article>

If you want code syntax highlighted, use GitHub Flavored Markdown rendered from GitHub's /markdown API.

How

See generate-github-markdown-css for how it's generated and ability to generate your own.

Dev

Run npm run make to update the CSS.

License

MIT © Sindre Sorhus

github-markdown-css's People

Contributors

sindresorhus avatar jumbosushi avatar bnjmnt4n avatar dguo avatar jpuck avatar proppy avatar tylerlong avatar

Stargazers

Abbi Christina Corcoran avatar bageltoes avatar vancaem avatar Scott Wright avatar Acampbell avatar

Watchers

James Cloos avatar

Forkers

nerosow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.