:export ICSS rule

Author: robrichardCreated Jan 20, 2023Updated Sep 16, 2026
Labelsarea: css-modules

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:

scss
$row-count: 4;

:export {
  rowCount: $row-count;
}

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

Source: parcel-bundler/lightningcss