postcss-markdown

WebJar for postcss-markdown

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

postcss-markdown
Last Version

Last Version

0.34.0
Release Date

Release Date

Type

Type

jar
Description

Description

postcss-markdown
WebJar for postcss-markdown
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/gucong3000/postcss-markdown

Download postcss-markdown

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/postcss-markdown/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>postcss-markdown</artifactId>
    <version>0.34.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-markdown/
implementation 'org.webjars.npm:postcss-markdown:0.34.0'
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-markdown/
implementation ("org.webjars.npm:postcss-markdown:0.34.0")
'org.webjars.npm:postcss-markdown:jar:0.34.0'
<dependency org="org.webjars.npm" name="postcss-markdown" rev="0.34.0">
  <artifact name="postcss-markdown" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='postcss-markdown', version='0.34.0')
)
libraryDependencies += "org.webjars.npm" % "postcss-markdown" % "0.34.0"
[org.webjars.npm/postcss-markdown "0.34.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : remark jar [9.0.0,10)
org.webjars.npm : unist-util-find-all-after jar [1.0.2,2)

Project Modules

There are no modules declared in this project.

PostCSS Markdown Syntax

NPM version Travis Travis Codecov David

PostCSS Syntax for parsing Markdown

Getting Started

First thing's first, install the module:

npm install postcss-syntax postcss-markdown --save-dev

If you want support SCSS/SASS/LESS/SugarSS syntax, you need to install the corresponding module.

Use Cases

var syntax = require('postcss-syntax')({
	// Enable support for HTML (default: true) See: https://github.com/gucong3000/postcss-html
	htmlInMd: true,
	// syntax for parse scss (non-required options)
	scss: require('postcss-scss'),
	// syntax for parse less (non-required options)
	less: require('postcss-less'),
	// syntax for parse css blocks (non-required options)
	css: require('postcss-safe-parser'),
});
var autoprefixer = require('autoprefixer');
postcss([ autoprefixer ]).process(source, { syntax: syntax }).then(function (result) {
	// An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
	result.content
});

input:

# title

```css
::placeholder {
	color: gray;
}
```

output:

# title

```css
::-webkit-input-placeholder {
	color: gray;
}
:-ms-input-placeholder {
	color: gray;
}
::-ms-input-placeholder {
	color: gray;
}
::placeholder {
	color: gray;
}
```

If you want support SCSS/SASS/LESS/SugarSS syntax, you need to install these module:

Advanced Use Cases

See: postcss-syntax

Style Transformations

The main use case of this plugin is apply PostCSS transformations to CSS (and CSS-like) code blocks in markdown file.

Versions

Version
0.34.0