0.36.0 • Published 4 years ago

@minna-ui/postcss-config v0.36.0

Weekly downloads
81
License
Apache-2.0
Repository
github
Last release
4 years ago

NPM version Licence

@minna-ui/postcss-config

PostCSS config preset for use in Minna UI projects or standalone.

Included plugins (in execution order):

PluginDocsNotes
postcss-advanced-variableslink
postcss-uselink
postcss-nestedlink
postcss-color-mod-functionlink
css-mqpackerlink(optimize only)
autoprefixerlink(optimize only)
cssnanolink(optimize only)

Usage

  1. Install this package and its dependencies:

    yarn add -D @minna-ui/postcss-config postcss postcss-scss
  2. Create a postcss.config.js file in your project root with this package as a plugin:

    module.exports = {
      map: true,
      plugins: {
        // the `unsafe` option is fine when compiling components separately, it
        // only becomes potentially dangerous when compiling a whole app
        '@minna-ui/postcss-config': { unsafe: true },
      },
      syntax: 'postcss-scss',
    };
  3. CSS is automatically transformed with our preset PostCSS plugins, but if you need extra functionality, you can specify PostCSS plugins directly in your CSS using @use (after first installing the plugin):

    @use postcss-extend-rule();
    
    .navbar-icon {
      @extend .icon;
    }

Options

OptionDefault valueTypeDescription
importPaths[process.cwd(), 'src', 'src/css']arrayA list of extra paths to search when resolving @import rules in CSS. First imports will try to resolve according to the CSS Import Resolve spec and then try again with each of the importPaths.
optimizeprocess.env.NODE_ENV === 'production'booleanPerform optimisations to reduce output file size and minimise runtime style computation.
unsafefalsebooleanApply potentially unsafe transformations (e.g. combining same @media).
debugtruebooleanShow useful debugging feedback (e.g. unresolved variables).
...optionsundefinedanyAny other options will be passed to all PostCSS plugins and to the nanocss preset options.This can be particuarly powerful if you need to pass options when using the @use rule — use the plugin name as a key, as shown in the postcss-use docs.

Licence

@minna-ui/postcss-config is part of Minna UI, an Apache-2.0 licensed open source project. See LICENCE.


© 2019 We Are Genki

0.36.1-next.57

4 years ago

0.36.0

4 years ago

0.35.2-next.58

4 years ago

0.35.2-next.35

4 years ago

0.35.2-next.30

4 years ago

0.36.0-next.24

4 years ago

0.35.0

4 years ago

0.34.0

5 years ago

0.33.0

5 years ago

0.32.0

5 years ago

0.31.0

5 years ago

0.30.0

5 years ago

0.29.0

5 years ago

0.28.0

5 years ago

0.27.0

5 years ago

0.26.0

5 years ago

0.25.0

5 years ago

0.24.0

5 years ago

0.23.0

5 years ago

0.22.1

5 years ago

0.22.1-beta.2

5 years ago

0.22.1-beta.0

5 years ago

0.22.0-beta.0

5 years ago

0.22.0-next.23

5 years ago

0.22.0-next.20

5 years ago

0.22.0-next.12

5 years ago

0.22.0-next.332

5 years ago

0.22.0-next.331

5 years ago

0.22.0-next.325

5 years ago

0.22.0-next.307

5 years ago

0.22.0-next.298

5 years ago

0.22.0-next.288

5 years ago

0.22.0-next.274

5 years ago

0.22.0-next.266

5 years ago

0.22.0-next.265

5 years ago

0.22.0-next.262

5 years ago

0.22.0-next.260

5 years ago

0.22.0-next.235

5 years ago

0.22.0-next.228

5 years ago

0.22.0-next.193

5 years ago

0.22.0-next.190

5 years ago

0.22.0-next.77

5 years ago

0.21.0

5 years ago

0.20.0

5 years ago

0.19.0

5 years ago

0.18.1

5 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.0

6 years ago

0.15.0

6 years ago

0.13.0

6 years ago

0.12.0

6 years ago

0.11.1

6 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.0

6 years ago