NPM Build Utilities @ 0.2.0-alpha.1
    Preparing search index...

    Interface PostCSS

    Optional default configuration to use when processing css with postCSS.

    0.2.0-alpha

    interface PostCSS {
        plugins?: AcceptedPlugin[];
        presetEnv?:
            | false
            | {
                autoprefixer?: Options;
                browsers?: null
                | string
                | string[];
                debug?: boolean;
                enableClientSidePolyfills?: boolean;
                env?: string;
                features?: pluginsOptions;
                insertAfter?: Record<string, unknown>;
                insertBefore?: Record<string, unknown>;
                logical?: {
                    blockDirection?: DirectionFlow;
                    inlineDirection?: DirectionFlow;
                };
                minimumVendorImplementations?: number;
                preserve?: boolean;
                stage?: number
                | false;
            };
        processor?: {
            map?: | boolean
            | {
                absolute?: boolean;
                annotation?: string
                | boolean
                | ((file: string, root: Root_) => string);
                from?: string;
                inline?: boolean;
                prev?: string | boolean | object | ((file: string) => string);
                sourcesContent?: boolean;
            };
            parser?: Parser<Document_ | Root_>
            | Syntax<Document_ | Root_>;
        };
    }
    Index

    Properties

    plugins?: AcceptedPlugin[]

    Instantiated plugins to include.

    Note that postcss-preset-env is included according to Args.presetEnv.

    presetEnv?:
        | false
        | {
            autoprefixer?: Options;
            browsers?: null
            | string
            | string[];
            debug?: boolean;
            enableClientSidePolyfills?: boolean;
            env?: string;
            features?: pluginsOptions;
            insertAfter?: Record<string, unknown>;
            insertBefore?: Record<string, unknown>;
            logical?: {
                blockDirection?: DirectionFlow;
                inlineDirection?: DirectionFlow;
            };
            minimumVendorImplementations?: number;
            preserve?: boolean;
            stage?: number
            | false;
        }

    Configuration passed to the postcss-preset-env plugin.

    Gets merged with the defaults in Stage.Compiler.ARGS_DEFAULT. If false, this plugin is not used.

    Type declaration

    • false
    • {
          autoprefixer?: Options;
          browsers?: null | string | string[];
          debug?: boolean;
          enableClientSidePolyfills?: boolean;
          env?: string;
          features?: pluginsOptions;
          insertAfter?: Record<string, unknown>;
          insertBefore?: Record<string, unknown>;
          logical?: {
              blockDirection?: DirectionFlow;
              inlineDirection?: DirectionFlow;
          };
          minimumVendorImplementations?: number;
          preserve?: boolean;
          stage?: number
          | false;
      }
      • Optionalautoprefixer?: Options
      • Optionalbrowsers?: null | string | string[]

        PostCSS Preset Env supports any standard browserslist configuration, which can be a .browserslistrc file, a browserslist key in package.json, or browserslist environment variables.

        The browsers option should only be used when a standard browserslist configuration is not available. When the browsers option is used the env option is ignored.

      • Optionaldebug?: boolean

        Enable debugging messages to stdout giving insights into which features have been enabled/disabled and why. default: false

      • OptionalenableClientSidePolyfills?: boolean

        Enable any feature that would need an extra browser library to be loaded into the page for it to work. default: false

      • Optionalenv?: string

        PostCSS Preset Env supports any standard browserslist configuration, which can be a .browserslistrc file, a browserslist key in package.json, or browserslist environment variables.

        The env option is used to select a specific browserslist environment in the event that you have more than one.

      • Optionalfeatures?: pluginsOptions

        Enable or disable specific polyfills by ID. Passing true to a specific feature ID will enable its polyfill, while passing false will disable it.

        Passing an object to a specific feature ID will both enable and configure it.

      • OptionalinsertAfter?: Record<string, unknown>

        The insertAfter key allows you to insert other PostCSS plugins into the chain. This is only useful if you are also using sugary PostCSS plugins that must execute after certain polyfills. insertAfter supports chaining one or multiple plugins.

      • OptionalinsertBefore?: Record<string, unknown>

        The insertBefore key allows you to insert other PostCSS plugins into the chain. This is only useful if you are also using sugary PostCSS plugins that must execute before certain polyfills. insertBefore supports chaining one or multiple plugins.

      • Optionallogical?: { blockDirection?: DirectionFlow; inlineDirection?: DirectionFlow }

        The logical object allows to configure all plugins related to logical document flow at once. It accepts the same options as each plugin: inlineDirection and blockDirection.

        • OptionalblockDirection?: DirectionFlow

          Set the block flow direction. default: top-to-bottom

        • OptionalinlineDirection?: DirectionFlow

          Set the inline flow direction. default: left-to-right

      • OptionalminimumVendorImplementations?: number

        Determine which CSS features to polyfill, based their implementation status. default: 0

      • Optionalpreserve?: boolean

        Determine whether all plugins should receive a preserve option, which may preserve or remove the original and now polyfilled CSS. Each plugin has it's own default, some true, others false. default: not set

      • Optionalstage?: number | false

        Determine which CSS features to polyfill, based upon their process in becoming web standards. default: 2

    processor?: {
        map?:
            | boolean
            | {
                absolute?: boolean;
                annotation?: string
                | boolean
                | ((file: string, root: Root_) => string);
                from?: string;
                inline?: boolean;
                prev?: string | boolean | object | ((file: string) => string);
                sourcesContent?: boolean;
            };
        parser?: Parser<Document_ | Root_>
        | Syntax<Document_ | Root_>;
    }

    Options used with postcss.process.

    Type declaration

    • Optionalmap?:
          | boolean
          | {
              absolute?: boolean;
              annotation?: string
              | boolean
              | ((file: string, root: Root_) => string);
              from?: string;
              inline?: boolean;
              prev?: string | boolean | object | ((file: string) => string);
              sourcesContent?: boolean;
          }

      Remapping of postcss.SourceMapOptions for better typing and documentation.

    • Optionalparser?: Parser<Document_ | Root_> | Syntax<Document_ | Root_>