スタイルシート全体で特定のメディア クエリ条件が満たされている場合、(高解像度画像の経路を維持するために) いくつかの LESS 変数を変更したいのですが、うまくいかないようです。
// Default
@logo: 'logo.png';
@sprite: 'sprite.png';
// High resolution displays
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
@logo: 'logo@2x.png';
@sprite: 'sprite@2x.png';
}
おそらく、これに対するより簡単な解決策がありますか?