# @goldpage/postcss

Latest version **0.5.13** (published 2020-11-12) · 0 weekly downloads

## Install

```sh
npm install @goldpage/postcss
pnpm add @goldpage/postcss
yarn add @goldpage/postcss
bun add @goldpage/postcss
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.13 |
| Published | 2020-11-12 |
| First published | 2019-09-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Maintainers | brillout |

## Links

- npm: https://www.npmjs.com/package/@goldpage/postcss
- Repository: https://github.com/reframejs/goldpage
- Homepage: https://github.com/reframejs/goldpage#readme
- Issues: https://github.com/reframejs/goldpage/issues
- npm.io page: https://npm.io/package/@goldpage/postcss

## Dependencies (4)

- [css-loader](https://npm.io/package/css-loader.md) ^2.1.1
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^3.0.0
- [@brillout/reconfig](https://npm.io/package/@brillout/reconfig.md) 0.5.13
- [mini-css-extract-plugin](https://npm.io/package/mini-css-extract-plugin.md) ^0.6.0

## Recent versions

- 0.5.13 (latest) — 2020-11-12
- 0.5.12 — 2020-11-12
- 0.5.11 — 2020-10-13
- 0.5.10 — 2020-10-01
- 0.5.9 — 2020-09-27
- 0.5.8 — 2020-09-17
- 0.5.7 — 2020-07-22
- 0.5.6 — 2020-03-22
- 0.5.5 — 2019-10-14
- 0.5.4 — 2019-10-03
- 0.5.3 — 2019-10-02
- 0.5.2 — 2019-09-14
- 0.5.1 — 2019-09-09
- 0.5.0 — 2019-09-08

## README

<!---






    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).






-->

Goldpage + PostCSS = :heart:

# `@goldpage/postcss`

Use Goldpage with PostCSS.

### Usage

Install `@goldpage/postcss`.

~~~shell
$ npm install @goldpage/postcss
~~~

The `@goldpage/postcss` plugin is automatically loaded.

Configure PostCSS:

~~~js
module.exports = {
  // All options defined here are passed down as options for `postcss-loader`.
  // Thus, this is where you add PostCSS plugins, a PostCSS parser, etc.
  postcss: {
    plugins: [
      require('postcss-cssnext')()
    ],
    parser: 'sugarss',
  },
};
~~~

### Example

~~~sugarss
// ./example/pages/landing.css

:root
  --red: #f88
  --blue: #88f

.red-on-blue
  background-color: var(--blue)
  color: var(--red)

.blue-on-red
  background-color: var(--red)
  color: var(--blue)

.red-on-blue,
.blue-on-red
  font-size: 2em
  width: 300px
  padding: 20px
  margin: 10px
~~~

~~~js
// ./example/pages/landing.page.js

import React from 'react';
import './landing.css';

const LandingComponent = () => (
  <div>
    <div className="blue-on-red">
      Blue on red.
    </div>
    <div className="red-on-blue">
      Red on blue.
    </div>
  </div>
);

const LandingPage = {
  route: '/',
  view: LandingComponent,
  renderToDom: false,
  renderToHtml: true,
};

export default LandingPage;
~~~

~~~js
// ./example/goldpage.config.js

module.exports = {
  // All options defined here are passed down as options for `postcss-loader`.
  // Thus, this is where you add PostCSS plugins, a PostCSS parser, etc.
  postcss: {
    plugins: [
      require('postcss-cssnext')()
    ],
    parser: 'sugarss',
  },
};
~~~

<!---






    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Instead, edit `/plugins/postcss/readme.template.md` and run `npm run docs` (or `yarn docs`).






-->

---
_Source: https://npm.io/package/@goldpage/postcss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
