JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 48
  • Score
    100M100P100Q69486F
  • License CC0-1.0

Easily create and maintain style guides with CSS comments using Markdown

Package Exports

  • mdcss

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdcss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mdcss

NPM Version Build Status

mdcss lets you easily create and maintain style guides with CSS comments using Markdown.

/*---
title:   Buttons
section: Base CSS
---

Button styles can be applied to any element. Typically you'll want to use
either a `<button>` or an `<a>` element:

​```html_example
<button class="btn">Click</button>
<a class="btn" href="/some-page">Trulia!</a>
​```
*/

.btn {
    background-color: black;
    color: white;
}

Usage

Add mdcss to your build tool:

npm install mdcss --save-dev

Node

require('mdcss')({ /* options */ }).process(YOUR_CSS);

PostCSS

Add PostCSS to your build tool:

npm install postcss --save-dev

Load mdcss as a PostCSS plugin:

postcss([
    require('mdcss')({ /* options */ })
]);

Gulp

Add Gulp PostCSS to your build tool:

npm install gulp-postcss --save-dev

Enable mdcss within your Gulpfile:

var postcss = require('gulp-postcss');

gulp.task('css', function () {
    return gulp.src('./css/src/*.css').pipe(
        postcss([
            require('mdcss')({ /* options */ })
        ])
    ).pipe(
        gulp.dest('./css')
    );
});

Grunt

Add Grunt PostCSS to your build tool:

npm install grunt-postcss --save-dev

Enable mdcss within your Gruntfile:

grunt.loadNpmTasks('grunt-postcss');

grunt.initConfig({
    postcss: {
        options: {
            processors: [
                require('mdcss')({ /* options */ })
            ]
        },
        dist: {
            src: 'css/*.css'
        }
    }
});

Options

theme

Type: NPM Repository
Default: require('mdcss-theme-github')

The mdcss theme that you would like to use.

destination

Type: String
Default: 'styleguide'

The directory that you would like your style guide written to.