parcel-bundler / parcel-bundler/lightningcss

:export ICSS rule

Open
#404 12 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: css-modules
Dominant language
Rust
Stars
7.7k
Forks
302
PR merge metrics
No merged PRs in 30d

Description

The docs currently say the :import and :export ICSS rules are not supported. Is there any plan to add support, specifically for :export? In our codebase we use css modules precompiled with sass and use :export to expose values defined in sass variables to JS.

Example:

$row-count: 4;

:export {
  rowCount: $row-count;
}

.list {
    display: grid;
    grid-template-columns: repeat($row-count, 1fr);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the documentation entry that marks :import and :export unsupported, then trace the existing ICSS handling in the Rust compiler. Define and test :export behavior for Sass-derived values, including the provided example, and update the documentation once the supported output is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, rust, sass
Domain
compilers, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.