Interesting. It doesn't make sense for & to refer to a directive so this seems like a sensible behavior in that case. I doubt this is very hard to implement -- would you open an issue on github so we don't forget?
chris On Sun, Jul 11, 2010 at 10:53 AM, Aaron Russell <aaron...@gmail.com> wrote: > I've just discovered that you can't seem to nest @media queries and > use the parent selector reference. I think this would be massively > useful to achieve something like: > > @mixin dual-bg-image($image) { > background-image: image_url($image); > // target iphone4 > @media only screen and (-webkit-min-device-pixel-ratio: 2), only > screen and (min-device-pixel-ratio: 2) & { > background-image: image_url('hires-'+$image); > } > } > > .myelement { > @include dual-bg-image('myimage.png'); > } > > To produce the following CSS: > > .myelement { > background-image: url('/images/myimage.png'); > } > @media only screen and (-webkit-min-device-pixel-ratio: 2), only > screen and (min-device-pixel-ratio: 2) { > .myelement { > background-image: url('/images/hires-myimage.png'); > } > } > > Any thoughts? > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to h...@googlegroups.com. > To unsubscribe from this group, send email to > haml+unsubscr...@googlegroups.com <haml%2bunsubscr...@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to h...@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.