postcss-simple-extend icon indicating copy to clipboard operation
postcss-simple-extend copied to clipboard

Nest media queries in block

Open jacobp100 opened this issue 8 years ago • 2 comments

Suggestion,

@define-placeholder gigantic {
  font-size: 40em;

  @media (max-width: 600px) {
    font-size: 20em;
  }
}

Or,

@define-placeholder gigantic {
  font-size: 40em;
}

@extend-placeholder (max-width: 600px) gigantic {
  font-size: 20em;
}

jacobp100 avatar May 20 '16 11:05 jacobp100

The nesting resolution should be relegated to a plugin like postcss-nested. But I'm open to a PR making changes that ensure it works this way with postcss-nested.

davidtheclark avatar May 20 '16 13:05 davidtheclark

Added behind an option. Can confirm this worked when using in combination with the plugin you suggested! https://github.com/davidtheclark/postcss-simple-extend/pull/12

jacobp100 avatar May 20 '16 14:05 jacobp100