Skip to content

Parent selectors getting duplicated in media queries #4

@emarthinsen

Description

@emarthinsen

This is a tricky one. My SCSS file looks like this:

@media all and (min-width: 1000px) {
  article {
    header {
      ol {
        li {
          .post-author {
            &:before { content: ''; }
            &:after { content: '*'; }
          }
        }
      }
    }
  }
} 

When it gets compiled, here is the source:

@media all and (min-width: 1000px) {
  article header ol li article header ol li .post-author: before {
    content: '';
  }

  article header ol li article header ol li .post-author:after {
    content: '*';
  }
}

The chain of selectors "article header ol li" are being repeated twice, when I was only expecting it once.

Any ideas on how to fix this?

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