csstools / postcss-nesting

Nest style rules inside each other

Home Page:https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

on v4.0.0 some nesting forms are not allowed anymore

cloud-walker opened this issue · comments

On my stack I use BEM and I usually nest like this:

.header {
  position: relative;
  background: $color-primary;
  border-bottom: solid 1px rgba(255, 255, 255, 0.15);

  &__container {
    display: flex;
    align-items: center;
    min-height: calc($spacing-unit * 3);
    @mixin container;

    @media screen and (max-width: $width-md) {
      flex-wrap: wrap;
      padding: 0 $spacing-small;
    }
  }

But v4.0.0 it seems to break support of this form of nesting, and the Changelog says only this:
schermata 2017-05-22 alle 11 46 12

What I'm doing wrong?

I've found this issue: #17 postcss-nesting is not for me then, I'll close this, thanks anyway!

@cloud-walker, that is completely understandable. Concatenative selectors are useful and tricky (as #17 shows). For that kind of Sassy nesting, I very much recommend PostCSS Nested.