You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
837816638@qq.com b02b851162
工商大学管理系统代码
5 years ago
..
LICENSE 工商大学管理系统代码 5 years ago
README.md 工商大学管理系统代码 5 years ago
camel-case.js 工商大学管理系统代码 5 years ago
extract.js 工商大学管理系统代码 5 years ago
get-template.js 工商大学管理系统代码 5 years ago
index.js 工商大学管理系统代码 5 years ago
literal.js 工商大学管理系统代码 5 years ago
object-parse.js 工商大学管理系统代码 5 years ago
object-parser.js 工商大学管理系统代码 5 years ago
object-stringifier.js 工商大学管理系统代码 5 years ago
object-stringify.js 工商大学管理系统代码 5 years ago
object-syntax.js 工商大学管理系统代码 5 years ago
object.js 工商大学管理系统代码 5 years ago
package.json 工商大学管理系统代码 5 years ago
template-parse.js 工商大学管理系统代码 5 years ago
template-parser-helper.js 工商大学管理系统代码 5 years ago
template-parser.js 工商大学管理系统代码 5 years ago
template-safe-parse.js 工商大学管理系统代码 5 years ago
template-safe-parser.js 工商大学管理系统代码 5 years ago
template-stringifier.js 工商大学管理系统代码 5 years ago
template-stringify.js 工商大学管理系统代码 5 years ago
template-tokenize.js 工商大学管理系统代码 5 years ago
un-camel-case.js 工商大学管理系统代码 5 years ago

README.md

PostCSS JSX Syntax

NPM version Travis Travis Codecov David

PostCSS syntax for parsing CSS in JS literals:

Getting Started

First thing's first, install the module:

npm install postcss-syntax postcss-jsx --save-dev

Use Cases

const postcss = require('postcss');
const stylelint = require('stylelint');
const syntax = require('postcss-syntax');
postcss([stylelint({ fix: true })]).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:

import glm from 'glamorous';
const Component1 = glm.a({
	flexDirectionn: 'row',
	display: 'inline-block',
	color: '#fff',
});

output:

import glm from 'glamorous';
const Component1 = glm.a({
	color: '#fff',
	display: 'inline-block',
	flexDirectionn: 'row',
});

Advanced Use Cases

Add support for more css-in-js package:

const syntax = require('postcss-syntax')({
	"i-css": (index, namespace) => namespace[index + 1] === "addStyles",
	"styled-components": true,
});

See: postcss-syntax

Style Transformations

The main use case of this plugin is to apply PostCSS transformations to CSS code in template literals & styles as object literals.