postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.15k stars 66 forks source link

`@container` should bubble by default #151

Closed mayank99 closed 1 year ago

mayank99 commented 1 year ago

Consider this code:

a {
  color: hotpink;

  @container (min-width: 200px) {
    color: rebeccapurple;
  }
}

When running through postcss-nested, it seems to remain unchanged.

I would have expected the above to produce:

a {
  color: hotpink;
}
@container (min-width: 200px) {
  a {
    color: rebeccapurple;
  }
}

Container queries are now supported in 80% of browsers worldwide, so it makes sense to handle it by default rather than require it to be manually passed to the bubble option.

ai commented 1 year ago

Fixed 6e3b93c

ai commented 1 year ago

Released in 6.1.

mayank99 commented 1 year ago

awesome, thank you!