0.3.2 • Published 6 years ago

@reframe/postcss v0.3.2

Weekly downloads
1
License
-
Repository
github
Last release
6 years ago

Reframe + PostCSS = :heart:

@reframe/postcss

Use Reframe with PostCSS.

Usage

Add @reframe/postcss to your reframe.config.js:

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/postcss') // npm install @reframe/postcss
    ],

    // 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

// /plugins/postcss/example/reframe.config.js

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/postcss') // npm install @reframe/postcss
    ],

    // 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',
    }
};
// /plugins/postcss/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
// /plugins/postcss/example/pages/landing.config.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,
    doNotRenderInBrowser: true,
};

export default LandingPage;
0.3.2

6 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.13-next.0

7 years ago

0.1.12

7 years ago

0.1.12-next.0

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1-rc.21

7 years ago

0.0.1-rc.20

7 years ago

0.0.1-rc.19

7 years ago

0.0.1-rc.18

7 years ago

0.0.1-rc.17

7 years ago

0.0.1-rc.16

7 years ago

0.0.1-rc.15

7 years ago

0.0.1-rc.14

7 years ago

0.0.1-rc.13

7 years ago

0.0.1-rc.12

7 years ago

0.0.1-rc.11

7 years ago

0.0.1-rc.10

7 years ago

0.0.1-rc.9

7 years ago

0.0.1-rc.8

7 years ago

0.0.1-rc.7

7 years ago

0.0.1-rc.5

7 years ago

0.0.1-rc.4

7 years ago

0.0.1-rc.3

7 years ago

0.0.1-rc.2

7 years ago