Skip to content

Extract resolve-nested-selector to a separate package #2

@MorevM

Description

@MorevM

Originally, the plugin relied on the postcss-resolve-nested-selector package, but it quickly became clear that it wasn't sufficient:

  • It doesn't handle SASS constructs like @at-root;
  • It requires multiple calls to parse compound selectors (.foo &, .bar &);
  • It provides no information about what & actually resolves to;
  • Few other tweaks here and there.

The module was therefore rewritten from scratch for this plugin.
I believe it could be useful to the wider community as well.

Personally, I need it to build an IDE extension for my v-bem-transformer package, enabling direct resolution and navigation from a template to the corresponding style declaration, which in turn depends on being able to resolve nested SASS selectors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions