Skip to content

Instantly share code, notes, and snippets.

@vio
Last active August 29, 2015 14:20
Show Gist options
  • Save vio/4cbf5268444250a4804b to your computer and use it in GitHub Desktop.
Save vio/4cbf5268444250a4804b to your computer and use it in GitHub Desktop.
Stylus - nested block mixins bug
breakpoint()
  @media (min-width: 1024px)
    {block}

retina()
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)
    {block}

+breakpoint()
  .element-1
    &__child
      +retina()
        color: red

.element-2
  +breakpoint()
    &__child
      +retina()
        color: red
@media (min-width: 1024px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 1024px) and (min-resolution: 192dpi), (min-width: 1024px) and (min-resolution: 2dppx) {
    __child {
        color: #f00;
    }
}
@media (min-width: 1024px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 1024px) and (min-resolution: 192dpi), (min-width: 1024px) and (min-resolution: 2dppx) {
    .element-2__child {
        color: #f00;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment