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
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-devNode
require('mdcss')({ /* options */ }).process(YOUR_CSS);PostCSS
Add PostCSS to your build tool:
npm install postcss --save-devLoad mdcss as a PostCSS plugin:
postcss([
require('mdcss')({ /* options */ })
]);Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-devEnable 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-devEnable 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.