Skip to content

composes / compose-with for global CSS class names #23

Closed
@danielweck

Description

@danielweck

The documentation gives this example ( https://github.com/css-modules/css-modules#composing-from-global-class-names ):

.otherClassName {
  composes: globalClassName from global;
}

...but the syntax supported by postcss-modules-scope is in fact:

.otherClassName {
  composes: global(globalClassName);
}

...as I discovered in the code:

const global = /^global\(([^\)]+)\)$/.exec(className);

So, should this be documented somewhere?

Thanks for this piece of software though, keep up the good work! :)

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