SelectorList.parse constructor

SelectorList.parse(
  1. String contents, {
  2. Object? url,
  3. Logger? logger,
  4. InterpolationMap? interpolationMap,
  5. bool allowParent = true,
  6. bool plainCss = false,
})

Parses a selector list from contents.

If passed, url is the name of the file from which contents comes. If allowParent is false, this doesn't allow ParentSelectors. If plainCss is true, this parses the selector as plain CSS rather than unresolved Sass.

If passed, interpolationMap maps the text of contents back to the original location of the selector in the source file.

Throws a SassFormatException if parsing fails.

Implementation

factory SelectorList.parse(String contents,
        {Object? url,
        Logger? logger,
        InterpolationMap? interpolationMap,
        bool allowParent = true,
        bool plainCss = false}) =>
    SelectorParser(contents,
            url: url,
            logger: logger,
            interpolationMap: interpolationMap,
            allowParent: allowParent,
            plainCss: plainCss)
        .parse();