Skip to content

SASS Interpolation Not Parsed in Loose Mode #23

@edg2s

Description

@edg2s
  • Node Version: 7.6
  • NPM Version: 4.1.2
  • postcss-values-parser Version: latest

This issue is regarding a problem with:

  • Standard CSS
  • LESS
  • SCSS
  • SASS

If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.

a { margin: calc(100% - #{$margin * 2px}); }
// resulting node tree
func calc
  paren
  number 100, unit='%'
  operator '-'
  word '#{$margin'
  operator '*'
  number 2, unit='px}'
  paren

Expected Behavior

The parser should account for the SCSS bracket interpolation.

Actual Behavior

SCSS bracket interpolation isn't recognized and is instead part of surrounding word nodes. See tree output.

How can we reproduce the behavior?

Parse the references css with loose: true option.

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