Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ICSS: Importing a composed class name produces wrong output #997

Open
@joepie91

Description

@joepie91
  • Operating System: Linux
  • Node Version: v10.17.0
  • NPM Version: n/a, Yarn 1.15.2
  • webpack Version: 4.41.2
  • css-loader Version: 3.2.0

Expected Behavior

css-loader should produce correct output:

.outer-box__outerBox--1rUd7j4- .inner-box__innerBox--19HrVC2M.shared__box--3DFGfIs1 {background-color: lime;}

Selection_407

Actual Behavior

css-loader produces incorrect output:

.outer-box__outerBox--1rUd7j4- .inner-box__innerBox--19HrVC2Mshared__box--3DFGfIs1 {background-color: lime;}

Selection_406

Code

See below.

How Do We Reproduce?

Full repro case here:https://git.cryto.net/joepie91/icss-loader-test

Runyarn webpack to produce output with Webpack + css-loader (incorrect output), runyarn browserify-extract to produce output with Browserify + icssify (correct output).

Both output to the same files, so you can switch between them. Opentest/index.html in a browser to see the result.

The bug is caused by theimport handling using the JS/HTML-formatted (space-delimited) export, rather than a CSS-formatted (dot-delimited) export.

This means that when using a composed identifier (which consists of two space-delimited class names) as an imported identifier, the resulting selector rule will be broken (see code snippets above).

This can be fixed byreplacing spaces with dots in the case of ICSS imports.

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp