Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

[Feature Request] Support a package.json base directory as the root location of css files #43

@oleersoy

Description

@oleersoy

I'm publishing pure css modules like these:

The main attribute on package.json resolves the import currently via main: src/main/css/index.css. The postcss-import plugin can also import sub modules with import statements like this:

@import "@superflycss/utilities-layout/src/main/css/faucet.css";

Ideally the main attribute could be set to a directory like src/main/css (With functionality similar to the <base> html element) and this would be the base directory for all module imports. The above statement could then be shortened to:

@import "@superflycss/utilities-layout/faucet.css";

So in other words if we want the entire kitchen sink (index.css) then we do:

@import "@superflycss/utilities-layout";

But if we only want faucet.css or perhaps just a washer that goes to the faucet then we do:

@import "@superflycss/utilities-layout/faucet.css";

or

@import "@superflycss/utilities-layout/faucet/washer.css";

Does postcss-partial-import support this? Would this project be interested in supporting it? Here's a link to the original uncss issue that made this important:
Uncss causes infinite loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions