LoginSignup
3
3

More than 5 years have passed since last update.

Compass 1.0.0系からlinear-gradientにto構文が入った

Last updated at Posted at 2014-03-13

Compass-1.0.0系でやっとlinear-gradientミックスインにto構文が入った。
これでIE10以降もオケ。
compass-1.0.0.alpha.19で検証。

コンパイル前(scss)

#linear-gradient {
    @include background(linear-gradient(top, #000, #fff));
}

コンパイル後(css)

#linear-gradient {
  background: -moz-linear-gradient(top, #000000, #ffffff);
  background: -webkit-linear-gradient(top, #000000, #ffffff);
  background: linear-gradient(to bottom, #000000, #ffffff);
}

ちょっと前のalpha版はOperaのプレフィックスが入っていたがそれも無くなったようです。

1.0.0はベンダープレフィックスが整理されてるみたいだけど、border-radiusやbox-shadowはまだwebkitとmozのプレフィックスが付く。このへんは環境変数で管理するのでしょうかね。

追記

caniuseを参照してプレフィックスを管理できるようになりました。これは便利。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3