postcss-mapcss
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.1 • Public • Published

postcss-mapcss

PostCSS plugin to use MapCSS

input:

body {
  @apply antialiased text-gray-800
}

output:

body{
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  color: rgb(31 41 55/1)
}

Usage

import postcss from "https://deno.land/x/postcss_core@$VERSION/mod.js";
import mapcss from "https://deno.land/x/postcss_mapcss@VERSION/mod.ts";
import {
  bracketExtractor,
  Config,
  simpleExtractor,
} from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
import { presetTw } from "https://deno.land/x/mapcss@$VERSION/preset_tw/mod.ts";

const config: Config = {
  extractor: [simpleExtractor, bracketExtractor],
  preset: [presetTw()],
};

const css = `body {
  @apply antialiased text-gray-800
}
`;

const result = await postcss([mapcss(config)]).process(css);

Package Sidebar

Install

npm i postcss-mapcss

Weekly Downloads

15

Version

1.0.0-beta.1

License

MIT

Unpacked Size

1.29 MB

Total Files

419

Last publish

Collaborators

  • miyauci