Skip to content

Add support for pure CSS Modules #985

Closed
@Timer

Description

@Timer
  • Operating System: N/A
  • Node Version: N/A
  • NPM Version: N/A
  • webpack Version: N/A
  • css-loader Version: 3.2.0

Feature Proposal

Ability to use modules: 'pure', a very-desirable CSS Modules mode.

Feature Use Case

Defining global CSS using CSS Modules is arguably incorrect behavior, which modules: true / modules: 'local' allows.

The underlying postcss-modules-local-by-default library has a more desirable mode called pure, which only allows a :global selector when combined with :local.
This ensures users are not defining global effects within a CSS Modules file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions